Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error code ('wht?') in ExtAudioFileOpenURL in Swift when using aubio to read file

I'm using aubio to analyse an audio file, but when I try to use the function new_aubio_source like this:

let source = new_aubio_source(StringToUnsafeMutablePointerChar_t(url.absoluteString), 0, 512)

I always get these errors.

AUBIO ERROR: source_apple_audio: Failed opening file:///var/mobile/Containers/Data/Application/C11B42E5-02B5-4373-8302-0728B2CB2296/Documents/music.m4a, error in ExtAudioFileOpenURL ('wht?')
AUBIO ERROR: source_wavread: Failed opening file:///var/mobile/Containers/Data/Application/C11B42E5-02B5-4373-8302-0728B2CB2296/Documents/music.m4a (System error: No such file or directory)
AUBIO ERROR: source: failed creating aubio source with file:///var/mobile/Containers/Data/Application/C11B42E5-02B5-4373-8302-0728B2CB2296/Documents/music.m4a at samplerate 0 with hop_size 512

I am 100% sure that the path is correct, but I just can't find out why these errors occur. I think the problem is in the first error message (source_apple_audio).

source_apple_audio is defined here:

source_apple_audio

which used this function: ExtAudioFileOpenURL, and got the error code ('wht?')

Thank you very much for your help!

like image 568
desperado Avatar asked Oct 19 '22 04:10

desperado


1 Answers

Do you also have this problem when removing the leading file:// ?

Please open a new issue.

like image 133
piem Avatar answered Oct 21 '22 03:10

piem