I have a soundboard app that uses an AVAudioSession. I attach AVAudioPlayerNodes to an AVAudioEngine to play the audio files.
Everything works great on iOS 9.2, however a lot of my reviews say the sound doesn't work. And I just tried on an iPhone 5s running iOS 8 and the sounds do not work.
I cannot figure out why this is, given the app worked fine before I updated it. And I did not make any major changes to how the sound is produced. Is there any compatibility issues with AVFoundation and iOS8 or older devices I am not aware of?
Update: When I decreased the number of nodes attached to my engine, the sound works again. It seems some devices can't handle the amount of nodes I am attaching? Wondering if a workaround for this would be to make multiple engine objects instead of just one?
Related
We have a really weird bug in out game where when we upload it into Beta and send it out through test flight, so phones play the game as intended and other phones have a weird issue pictured below:
From the image you can see the problem. One it does a ghosting type of thing with the characters as they move. Two, it acts like no scene is actually closing, but keeps stacking them on top of each other.
This problem does not occur on iPhone 6s or iPad Pro. It also doesn't occur on Android. We have only seen it on 5S and iPads.
We have looked at versions and that doesn't seem to be an issue either. We are using Unity 5.3 for this build (we reverted to this build as we felt it was the most stable, just to make sure that wasn;t an issue)
Anyone have an idea of what could be causing this problem?
Keep in mind that the things that are being seen are in different scenes.
in your camera settings you probably set clear flags to Dont clear set it to Depth only
I am simulating my game on my iPad Air iOS 9.1 produced using XCode 7.3 beta and Swift 2.2 Spritekit
I am using sounds via
SKAction.playSoundFileNamed(_: string)
whenever I start the game for the first time ; including going home screen then back to game ; the first played audio is very low or seems destructed.
Also I tried simulating premade games by other developers having the same problem .
Maybe a bug of the beta version of Xcode ?
I am not very familiar with SKAction but you can use prepareToPlay() on viewDidLoad or AppDelegate then you can play it when you need it.
Also, the m4a format will be faster than mp3.
You can find full code example in here: https://stackoverflow.com/a/34981944/2125010
I had the same issue. Playing silent sound when game becomes active resolves that.
Suddenly all my sounds sound really weird on the iphone and ipad, but they still sound ok in the Editor.
On the devices they sound similar to if they were played through a bad telephone connection over speaker - or if they were recorded with poor quality. And again, this only happens on the iPhone and iPad devices, in Unity itself it's all fine.
Things I tried already:
I have 3D sound disabled on the audio files
on the AudioSource, I have Bypass Effects, ByPass Listener Effects and Bypass Reverb Zones all set to 'true'
Doppler Level is set to 0
A while ago this was all good, and it may have happened when I updated to Unity 4.5.4 and XCode 6.0.1.
But I can't say that for sure.
Any ideas what that could be?
found it!
The problem was that in the Audio Settings 'Volume' was set 100 for some strange reason.
So - on the MAC the volume was set to small that's why it played ok - but on the iPhone it tried playing the loud sound so the speakers just went mad....
I'd like to somehow play music from one iOS device simultaneously on another, sort of like AirPlay, but from device to device.
It seems that by leveraging existing BT tech I should be able to make this happen, but I just haven't seen any examples nor have I read anything that suggests it's possible.
Check the following threads which might help to answer your question.
iOS Stream Audio from one iOS Device to Another
How do I stream AVAsset audio wirelessly form one iOS device to another?
I have a very strange bug in a shipping iPad/iPhone app that I can't fix/track down.
My app plays video in a standard MPMoviePlayerController but with the interface hidden and my own buttons to play and stop.
That works fine but sometimes, after a few times of use, my app refuses to play any further video. This happens only on the iPad (in iOS 3.2.x), on the iPhone (in iOS 4.x) everything works fine all the time. Strangely enough, even after I quit my app, after I start it again it still refuses to play video. It doesn't save the video state, and it does reload the video. Only after I restart the iPad it starts working again.
If my iPad is in a "don't play video" state I can debug my app from Xcode and there isn't anything different other than the fact that the movie doesn't play but stays paused indefinitely.
The loadState property reports as MPMovieLoadStatePlayable, but the playbackState property stays MPMoviePlaybackStatePaused however many times I sent it a "play" command.
There is nothing I can do in my app (like choosing another video) to make the video work again.
The videos are 600 x 400 H.264 and are played in a view that is larger than full screen so I can show them full screen (without black bars) on the iPad without needing two different versions for iphone/ipad, because the devices have different aspect ratios.
There is plenty of RAM available (> 60 MB). Other apps that play video (iTunes/YouTube/streamToMe) play fine, but use the standard MoviePlayer interface/controls and don't of course don't play bigger than full screen.
This all makes me suspect this is an Apple bug. I haven't yet tested this in a beta version of iOS, and if so I couldn't talk about it either.
Anybody seen this behaviour? And has a possible solution? Thanks!
In this thread Ipad MPMovieplayerController video loads but automatically pauses when played it appears they solved the issue by using player.useApplicationAudioSession = NO;. Give it a try!
This is a quite common bug with MPMoviePlayerController on iPad OS 3.2.x
After a few runs of any app, the movies fail to play and if you move the scrubber you can see the frames but you can't still play the video for more than one frame at a time!
Besides you may notice a great memory consumption, due to the fact that some apps start receiving memory warnings more often than normal.
Finally you may prove this is a system problem (and not specifically an app problem) buy trying to run other apps that use the same framework, e.g. "ABC News". The issues cannot be seen with other apps that use UIWebView for instance (e.g. the ones based on You Tube videos).
The only solution is to re-boot the device. This works until next reboot.
Carlo