20 Jun '13 - 06:20
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
Un4seen Developments Forum
>
Developments
>
BASS
> Topic:
Streaming playback is lagging in CPU-intensive scene
Pages: [
1
]
« previous
|
next »
Reply
|
Print
Author
Topic: Streaming playback is lagging in CPU-intensive scene (Read 378 times)
Total Eclipse
Posts: 8
Streaming playback is lagging in CPU-intensive scene
«
on:
22 Feb '12 - 11:47 »
Quote
Hello!
We have an iOS game built with the cocos2d framework, where initially we were using the Cocos Denshion sound engine. We are now trying to switch to BASS and although we've been through some obstacles, we're almost done integrating the BASS API with our game.
The only problem we are facing now is a playback issue on a streaming music track. Particularly, in a CPU-intensive scene (it climbs up to 100% CPU load temporarily if more apps are running in the background), the music playback has considerable lag. The music is played by an hstream channel, created with BASS_StreamCreateFile. We had no issues streaming the music in the same scene with Denshion.
Any ideas for ensuring a smooth playback?
Thanks!
Logged
Ian @ un4seen
Administrator
Posts: 15366
Re: Streaming playback is lagging in CPU-intensive scene
«
Reply #1 on:
22 Feb '12 - 15:28 »
Quote
Just to be clear, when you say the playback is lagging, do you mean it is being interrupted, ie. stop/starting? If so, you could try increasing the BASS_CONFIG_BUFFER setting (prior to calling BASS_StreamCreateFile) and see if that helps. Also, what file format are you using for the music? MP3 will probably require the least CPU (of encoded formats), as it can be hardware decoded if you use the "mp3-free" BASS version.
Logged
Total Eclipse
Posts: 8
Re: Streaming playback is lagging in CPU-intensive scene
«
Reply #2 on:
28 Feb '12 - 16:46 »
Quote
Thank you Ian!
We tried increasing the BASS_CONFIG_BUFFER and it worked! We are using OGG files, because of the licensing issues with MP3s.
Does that mean that we're not getting hardware decoding? What format would you recommend for small size, high quality and hardware decoding, as well as the ability to stream and jump to any frame in the audio file with millisecond accuracy?
Logged
Ian @ un4seen
Administrator
Posts: 15366
Re: Streaming playback is lagging in CPU-intensive scene
«
Reply #3 on:
28 Feb '12 - 17:37 »
Quote
The "mp3-free" BASS version uses the device's MP3 decoder (rather than its own), so there aren't any MP3 patent licensing requirements with that. Another option is AAC (typically in an MP4 container), which also has hardware-assisted decoding support on iOS devices. AAC and HE-AAC are supported, with the former being faster to decode than the latter.
If you would like to make comparisons of different files/formats, you can use BASS_GetCPU to do that.
Logged
Pages: [
1
]
Reply
|
Print
Un4seen Developments Forum
>
Developments
>
BASS
> Topic:
Streaming playback is lagging in CPU-intensive scene
« previous
|
next »
Jump to:
Please select a destination:
-----------------------------
Developments
-----------------------------
=> BASS
=> XMPlay
=> MO3
-----------------------------
Off Topic
-----------------------------
=> General Discussion
Loading...