In the iphone 3.x platform, I use AudioQueueStart method to play music, but on ios4 platform, once the program into the background,then no sound, but I notice that the app is still running in background, I've added into the info.list UIBackgroundModes/Audio and applicationDidEnterBackground methods
One thing to check is that the AudioSession is active first.
In my case, I had previously set the session to inactive between song changes before starting a new song:
AudioSessionSetActive(false);
Once I removed this AudioQueueStart works just fine from the background.
Related
I am new to .Net MAUI and I never used the xamarin. I am trying to create a simple app (focused on android mainly) which records the audio and then plays it for them. So far, only one package has worked for me in this matter i.e. "Plugin.AudioRecorder" (https://github.com/NateRickard/Plugin.AudioRecorder) but, this package is not working with xiaomi devices. It is responding to the button click and navigating to the command but its startRecording function do nothing.
Here is my code.command snippet
I also need the audio transcription but that is a different story.
In my WP8 app, there is a background audio that plays throughout my App.
When I minimize the App, the audio obviously goes off as it is supposed to do. However, when I resume the app, the audio does not continue, that is totally stops!
Another interesting thing to be noted in my App is that after resuming, only the background music is affected whereas other audio that need to be played for a short duration, say for example on a button click, function normally as expected.
I think it's got something to do with the App's life cycle and Fast App Resume feature.
Kindly help me out. Thanks.
If you're not working on with the BackgroundAudioPlayer, then you should check this in order to play Background Audio within your application.
Reference: Background Audio Streamer Sample
Hi i am implementing vungle using the plugin for corona sdk.
The video shows fine but the advert plays over the top of my background music / sound.
I have tried calling audio.pause and audio.setVolume(0) before the advert is shown but that doesn't work, even if i call audio pause or setvolume and then show the ad wih a second delay.
The audio is paused but then resumes when the advert plays one second later.
E-mailed vungle but haven't had a reply.. I saw a post on the dev forums about it but it had no replies so i know other people have had the same problem just wondered if anyone has a solution?
Thanks!
I want to play two audio files simultaneously in WP8 from within the same app:
The first one will be launched by "BackgroundAudioPlayer.Instance.Play();".
The second one will be launched by an HTML5 "audio" element within a Html file of the app.
The scenario would be something like this:
When the user launches the app, the background music starts playing.
When the user goes to a particular Html page of the app, its associated music starts playing.
When the user switches the app or locks the screen, the music of that Html page stops, however, the background music keeps on playing until the app is closed.
When the user comes back to that Html page again, its associated music starts playing along with the background music.
Appreciate your suggestions on this.
Thanks.
Together, we have tested a very simple App trying to play simultanously two audio files. The App worked like this:
Play button has started audio file via BAP
then we have navigated in WebBrowser to a page (located in IsolatedStorage) where there was an audio element
and we have pushed play button in WebBrowser (still BAP playing in the background)
It turned out that WebBrowser uses BAP as a player, so after we have pressed the button, our poor BAP playing in the background was terminated and replaced with new fresh one from WebBrowser.
It means that our magnificent idea and superb plan had withered on the vine.
So crap....
You'd need to build a player in your app so it could run simultaneously to the native one.
This explains why you cant run a gif and play music simultaneously.
I'm building an app that uses AVAudioPlayer and MPMoviePlayerController. The sound works perfectly on the simulator. I know sound works on my phone because other apps play sound just fine (like this one used to). When I start the video, I hear about 0.2s of the background music that's supposed to be playing. I'm getting no errors.
I don't even know where to start on this one. Any idea?
I was getting the "occasional" blip of sound in my app, so I assumed my volume was fine. It turns out that my phone was switched to vibrate aka silent. I flipped the switch back and viola.
The new question is: Do I feel like a moron? Yes I do.
** EDIT **
I stumbled upon the idea to check the switch when I read an article on Understanding the Side Switch