audio.loadStream issue

Hi, im my game i have a menu to set the volume of fx and soundtrack separately. All works well on the simulator and on iPad but only if i use audio.loadSound. If i use audio.loadStream to load the soundtrack file all works perfectly on simulator but NOT on the iPad. On the device when i mute the soundtrack or only down volume i have NO effect. The soundtrack continue with the same volume.

My idea is that audio.setM… api when used with loadStream works only in the simulator but no in the device. Again if i use audio.loadSound on the soundtrack file all is ok.

I use last daily duild (621) and on ipad(first gen) firmware 4.3.3 no JB.

Thanks
Miro [import]uid: 44965 topic_id: 15301 reply_id: 315301[/import]

Very strange. Are you getting any errors in the device console? How does it behave in the Xcode simulator?

The audio code is almost identical between iOS and Mac, most of the differences deal with the decoder. But the same decoder is used for loadSound and loadStream, so that is even weirder.

Would you put together a simple reproducible test case and submit a bug here:
http://developer.anscamobile.com/content/bug-submission

Then please post the bug number so I can find it.
[import]uid: 7563 topic_id: 15301 reply_id: 56530[/import]

No errors in the console, and i think is normal because on the simulator all works perfectly.

Now i’ll go to create a test and open a bug-submission…

Thanks [import]uid: 44965 topic_id: 15301 reply_id: 56532[/import]

The device has a console log too which you can find in the Xcode Organizer.
Also, did you try the Xcode Simulator for comparison? That uses the iOS code path in the Corona code base. If the problem doesn’t appear in the Xcode Simulator, it suggests there is some subtle Apple bug on the real device.
[import]uid: 7563 topic_id: 15301 reply_id: 56533[/import]

I have tried now in the x-code simulator, in that is like the real device! in ansca simulator instead all works well. [import]uid: 44965 topic_id: 15301 reply_id: 56534[/import]

Ok i have submitted a little example code afflicted by the same issue. Case #8174.

Thanks
Miro [import]uid: 44965 topic_id: 15301 reply_id: 56562[/import]

I think you found an Apple bug. When we tested on the Mac simulator, we noticed the behavior was reversed from IOS. The soundtrack worked fine, but the sound effect volume would not change.

We then tested on Windows and Android. They both worked fine. So I am under the belief that you found an Apple OpenAL bug. I suspect the problem doesn’t have much to do with loadSound vs. loadStream, but was a coincidence of random order. Maybe if you shuffle the channel numbers around, you’ll see things break in other permutations.

Anyway, we’ll need Apple’s help to fix this bug. To get the ball rolling, you might want to file a bug directly with Apple at https://bugreport.apple.com. They might be able to run iOS binaries for debugging if you submit them…I’m a little unclear on that. The problem seems to be with the AL_MAX_GAIN property. Post your bug number here.

When I get a little more time, I’ll try to further isolate the problem for them and file additional information referring to your bug number.

Meanwhile, as a workaround for you, you might try using the audio.setVolume() commands directly instead of Max/MinVolume. Maintain your own caps so you never let channels exceed or go below your desired max/and mins.

[import]uid: 7563 topic_id: 15301 reply_id: 56597[/import]

Ok, thanks! for now i use setVolume.

I must send to apple an ad-hoc compiled version of the test file?

Miro [import]uid: 44965 topic_id: 15301 reply_id: 56627[/import]

You don’t have to, but the more information and the easier you make it for Apple to fix the bug, the more likely and sooner will the bugs get fixed. [import]uid: 7563 topic_id: 15301 reply_id: 56771[/import]