When i try to decode the raw h264 stream , CVBuffer gives me nil on callback, and this only happen on the real device(iPhone , iPad) and not on the simulator.
Any suggestions?!
Found this ffmpeg ticket, which, after debugging, seems to be caused by the same issue (nil CVBuffer, status -12909) - https://trac.ffmpeg.org/ticket/9016#trac-add-comment
So far no resolution -- and the same code works on Intel Macos (broken on M1). It is broken across both iPhone and iPad with iOS 15, but the same code worked on the same devices with iOS 14.x.
P.S. Also https://trac.ffmpeg.org/ticket/9713
Related
On iOS 16 beta, the following code is crashing:
AVSpeechSynthesisVoice(language: "en-US")!
with the following error code:
Fatal error: Unexpectedly found nil while unwrapping an Optional value
It worked fine before and I'm not seeing any API change.
Does anyone know what could be going on?
I believe you are experiencing this in the simulator, but not on actual devices - correct? The reason is that for iOS 16, the devices in the Xcode simulator do not come with any built-in voices, whereas they always used to.
As a result, AVSpeechSynthesisVoice.speechVoices() returns [], and AVSpeechSynthesisVoice(language: "en-US") returns nil.
To solve this, simply download one or more voices to the simulated device you are compiling to. To do that, on the device go to Settings > Accessibility > Spoken Content > Voices > English, select a voice, and download it.
It seems like Apple missed to add voice libraries to iOS 16 betas. Below code returns nil.
AVSpeechSynthesisVoice.speechVoices()
Which should return the list of available voices. I filed a bug, you should also.
On the Xcode 7.1.1 iPad Pro simulator, the following AVAssetExportSession method returns nil, given a valid AVAsset:
AVAssetExportSession *exportSession = [AVAssetExportSession exportSessionWithAsset:avAsset presetName:AVAssetExportPresetAppleM4A];
This method always succeeds for me on other iOS 8 and 9 devices and simulators.
I don't have an actual iPad Pro, so I'm not sure whether this is specific to the iPad Pro simulator.
Does anyone have any info on this? (I use AVAssetExportSession to trim the ends of audio files.)
Also, is there a way to query for the error associated with a failure for this method (since it doesn't return an error code)?
Here is a link to my sample Xcode project, stored on Dropbox. If anyone has an actual iPad Pro device, could you try running this? In the onExportAudio: method, could you see whether exportSession gets set to nil? (There's also an audio trimming method that gets called if exportSession is valid...I would be curious if the trimming code successfully trims the 4 second source audio file into a 2 second destination audio file.) ... https://www.dropbox.com/s/zy2qpx94h2pltpi/AudioExportTest_711.zip?dl=0
Thank you!
-Allan
I tried reproducing this issue on a real iPad Pro today, and the issue did not occur.
It appears to be Simulator-specific.
-Allan
I am using the code provided in this SO answer.
It works for most images, but when I had an image that I cropped using the built-in Photos app, I kept getting nil from the [context createCGImage:fromRect] call. After spending a lot of time trying various things and coming up empty, I decided to try it on my iPhone 5, and to my surprise, it worked!
Is this really expected to fail in iOS Simulator? Or is there something else I need to do to make it work in the simulator?
audio.setMaxVolume( volume, options ) not working on mac in corona simulator, I haven't tested it on the actual iOS device yet though It works perfectly on windows and Android device:
audio.setMaxVolume( 0, { channel=1 } )
Has anyone else encountered such a bug in Corona?
I have tested it on the actual device now iphone-4S - and it is working... Still not working in simulator on mac though.
Firstly, is the simulator outputting an error to the terminal?
Secondly, the setMaxVolume method returns true on success and false otherwise. So try:
local volumeSet = audio.setMaxVolume( 0, { channel=1 } )
print("Volume set? "..tostring(volumeSet))
This will let you know if Corona thinks it has worked.
NB: The corona documentation 'gotcha' says there is no max volume for the master volume, which means the device itself can set the volume to whatever the user tells it, but you can limit your app's sounds. Source
I am working on an iPhone APP and testing it on the iPhone simulator/Xcode. I have a problem: UIImagePickerController: "choose/play" a video from the library does not work on the Simulator (but it works on the real phone). How to solve this problem? Thanks for help.
Check if the error: "Error creating aggregate audio device" occurs where the NSLogs are printed. If so, the fix is in the following thread:
UIImagePickerController throws ERROR: 185: Error creating aggregate audio device: 'what' when trying to select video