ap4y / OrigamiEngine

Lightweight audio engine for iOS and OSX with flac, cue, mp3, m4a, m3u support.
http://ap4y.github.com/OrigamiEngine/
MIT License
545 stars 117 forks source link

does this library work with opus files? #57

Open kannanth opened 9 years ago

kannanth commented 9 years ago

I have an opus file (with extension .opus) that I'm trying to play using Origami in my iOS 8 app. I was debugging through and found out that it only supports files with the following extensions. { 3g2 = CoreAudioDecoder; 3gp = CoreAudioDecoder; aac = CoreAudioDecoder; ac3 = CoreAudioDecoder; adts = CoreAudioDecoder; aif = CoreAudioDecoder; aifc = CoreAudioDecoder; aiff = CoreAudioDecoder; amr = CoreAudioDecoder; au = CoreAudioDecoder; caf = CoreAudioDecoder; cue = CueSheetDecoder; m4a = CoreAudioDecoder; m4b = CoreAudioDecoder; m4r = CoreAudioDecoder; mp1 = CoreAudioDecoder; mp2 = CoreAudioDecoder; mp3 = CoreAudioDecoder; mp4 = CoreAudioDecoder; mpa = CoreAudioDecoder; mpeg = CoreAudioDecoder; snd = CoreAudioDecoder; wav = CoreAudioDecoder; }

I'm getting a "Error:Couldn't open source". To be more specific, the file is opus encoded within an ogg container.

Any thoughts as to I how I should proceed?

Thanks

kannanth commented 9 years ago

Just wanted wanted to add, I see that the there is a plugin folder with opus decoder, but I did not get it when I setup the project using cocoapods - to which I'm a newbie (absolute first project). I used a podfile with following.

platform :ios, '8.0' use_frameworks!

target 'MyOpusPlayer' do pod 'OrigamiEngine', '~> 1.0.14' end

ap4y commented 9 years ago

There is a separate subspec for an opus support.

kannanth commented 9 years ago

Thanks, I have managed to get it to comiple and play the opus file. But the playback is very slow and choppy. When I playback the file in FireFox (renaming the extension to ogg), it plays fine.

Here's the link to the file. Its a very small file. https://dl.dropboxusercontent.com/u/46046195/myfile.opus

Any thoughts?

ap4y commented 9 years ago

Cool, will try to check it over the weekend.

kannanth commented 9 years ago

Thanks - appreciate it. Looking forward for some pointers.

On Wed, Apr 1, 2015 at 3:41 PM, Arthur Evstifeev notifications@github.com wrote:

Cool, will try to check it over the weekend.

— Reply to this email directly or view it on GitHub https://github.com/ap4y/OrigamiEngine/issues/57#issuecomment-88625535.

Best Regards Kannan Thiagarajan

ap4y commented 9 years ago

Updated on master, was a error in opus decoder (incorrect sampling rate was used).

kannanth commented 9 years ago

Thank you I will check it out soon

Best regards

On Saturday, April 4, 2015, Arthur Evstifeev notifications@github.com wrote:

Updated on master, was a error in opus decoder (incorrect sampling rate was used).

— Reply to this email directly or view it on GitHub https://github.com/ap4y/OrigamiEngine/issues/57#issuecomment-89692516.

Best Regards Kannan Thiagarajan

kannanth commented 9 years ago

Works like a charm. Thank you.

Just a quick follow-up question. After the url finishes playing, the engineExpectsNextUrl gets called (as expected), but returning nil from this does not seem to have an effect, this method gets called repeatedly. Is this the expected behaviour?

Best Regards Kannan

On Sat, Apr 4, 2015 at 7:19 PM, Kannan Thiagarajan kannanth@gmail.com wrote:

Thank you I will check it out soon

Best regards

On Saturday, April 4, 2015, Arthur Evstifeev notifications@github.com wrote:

Updated on master, was a error in opus decoder (incorrect sampling rate was used).

— Reply to this email directly or view it on GitHub https://github.com/ap4y/OrigamiEngine/issues/57#issuecomment-89692516.

Best Regards Kannan Thiagarajan

Best Regards Kannan Thiagarajan

ap4y commented 9 years ago

there is an issue about this bug: #52, but I haven't looked into it yet.

janandre commented 8 years ago

Got opus working with these tips! GREAT. But somehow your fix commit did not make it to the version you get via cocoa pods. Had to apply your fix again.

Would be great to see you updating this project :)