is it possible to use MPMusicPlayerController with simpleAudio Engine simultaneously in cocos2d - cocos2d-iphone

I have a application which have a music selection layer- an option for selecting background mp3 music reside in resource folder and an option for selecting music from ipod. Now problem is that when i select music from ipod and then after game over if i start a new game and select background music from resource music it does not start.it gives the following log message-
2011-01-08 22:45:10.085
TapTapBugs[2247:307]
Denshion::CDLongAudioSource - Loading
new audio source backGroundMusic1.mp3
2011-01-08 22:45:10.360
TapTapBugs[2247:307]
Denshion::CDAudioManager - preload
background music aborted because audio
is not exclusive
22:45:10.416 TapTapBugs[2247:307]
Denshion::CDAudioManager - play bgm
aborted because audio is not exclusive
or sound is muted
Now my question- is it possible to use - MPMusicPlayerController with simpleAudio Engine in same application or not.And if possible how to do it??

Related

Embedding VLC player in a VCL C++ Application

I have an application exposing thousands of video files (mp4). I would like to embed a VLC media player, allowing the user to play movies, embedded on the form showing the movie items (on a flow panel).
This video show how to do it using Visual Basic and .NET https://www.youtube.com/watch?v=w9jCxmazVjw
Apparently, when installing VLC, COM objects are available in order to automate the player. Is it also possible to embed it on a VCL form?
I have no experience with COM objects in C++ Builder XE3.

Unreal lose tracking of VR headset after launching an external VR exe application

I created a VR experience in Unreal Engine, and inside the VR world, there is a button which can open an external exe, which is also a VR experence. It's like a VR menu room (Unreal application) and a mini VR game (not created by Unreal and is an external exe). When you play the mini game, Unreal VR menu is still open at the back.
I tried different ways to open external exe, such as:
FPlatformProcess::CreateProc
FMonitoredProcess
FInteractiveProcess
They can all successfully launch external exe, but the problem is, when the external exe is done playing and closed, the Unreal VR menu application will lose vision tracking of Oculus. This problem only happens if the external exe is a VR application. I tried to launch a regular exe, such as browser, and there is no lose tracking problem when I "alt tab" to jump back to Unreal VR application.
This is what I got from output log:
LogHMD: Vision Tracking Acquired
LogHMD: Lost Vision Tracking
Is this a bug of Unreal? Is there any way which can let Oculus retracked by Unreal after running an external VR exe?
Many thanks!
Oculus drivers should only handle one process at a time, so whenever that new application is starting, Unreal should give up its connection to the service because someone else is requesting the HMD to render those VR frames now. As a dedicated output, both applications issuing frames at the same time can't be a good thing.
Regarding your context, I suggest you try invoking the "Stereo On" Console Command to re-enable your HMD, though you might want to also try the Oculus specific "HMD Enable" command before hand.
Personal concern: Keeping that menu in the background must be consuming resources as well and, in VR, that's an optimization issue you might have to address eventually.

Recording audio output from application

I'm currently building a project on C++ using Visual Studio on Windows 8. This application captures video from camera and triggers some virtual animations in real-time, with some sounds being played along with the animations.
The user has the option to record the experience in video and sound. I already am able to record video, now I want to create a audio track of the sounds that are being played by the application, to later fuse both video and audio files.
So, which is the best way to record audio output from an application in windows?
Let me stress that I do NOT want to record audio from any input devices (such as a microphone), only from the application itself.
Best regards.
There is no recording of application output. If you generate audio on your own, you make a copy for the recording purposes, mix if you have multiple sources, and then use one of the APIs to produce a file depending on your preferences: directly writing a WAV file, Windows Media audio files (ASF/WMA), DriectShow, Media Foundation, third party libraries.
Real playback audio data is being mixed and sent for further playback. Sometimes you can enable loopback recording to capture fully mixed output (not just of specific application through) as if it is a capture from realtime audio input device.

Playing audio with directshow from resource file

i am currently writing a script mod for Grand Theft Auto IV using Scripthook C++.
I have been playing audio files by using this template: Simple C++ MP3 Player Class
My problem starts by attempting to use files from resource.
I have no idea how to load them.
Every time i tried to load sound from resource using my code, game crashed.
Already spend hours browsing google about how to play DirectShow audio from resource without any result.
Inside resource files:
(resource.h) #define WAV_Sound 106
(resource.rc) WAV_Sound RCDATA "MySound.wav"
Loading files from HDD is working fine
Load(TEXT("MySound.wav"));
But game crashes when i try one of this:
// Load from resource #1
LPCWSTR file = MAKEINTRESOURCE(WAV_Sound);
Load(file);
// Load from resource #2
Load((LPCWSTR) WAV_Sound);
Hope someone can help me out, thanks !
Microsoft recommended using DirectX Audio to provides multilayer interfaces for developing game, namely XAudio2, X3DAudio, XACT, ... etc, they are very powerful to process sound effect in 2d/3d game environment. Here is the link http://msdn.microsoft.com/en-us/library/ee415737%28v=vs.85%29
Please download and install the DirectX software development kit, and find the 'XAudio2BasicSound' example to open wave file from file or in resource or in dll and playback with IXAudio2 interface, it was very simple example but next step you can add sound effect to your game.

Play and pause an .wav or .mp3 file on windows

I am working on a console application where i have to deal with multiple sound file with all of same type(.wav or .mp3). I have the option to chose between the two.
I can play the sound fine using PlaySound() function but i need some extra features.
I need pausing the sound and then play from the position where it paused last time.
OR
Set a time from where playing should start and time for which it should play.
1 of the two options will do the job.
I am working on windows with DEV C++ compiler.
Any help and ideas?
Use the Windows Media Player activeX control for anything more sophistcated than straight playing of a WAV file. It is far easier.
See "Using the Windows Media Player Control in a C++ Program" on MSDN:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd564580(v=vs.85).aspx