gosu icon indicating copy to clipboard operation
gosu copied to clipboard

[WIP] Audio 2.0

Open Kjarrigan opened this issue 8 years ago • 2 comments

As the Sample-Song-Merge is quite a big thing (at least in my opinion) I already start this PR even if there is not much to show at the moment BUT I think its already worth discussing.

So here we are. I basically only changed Audio.hpp and test_audio.rb so far to show how I think the final interface would/should look like after merge.

Kjarrigan avatar Mar 13 '18 15:03 Kjarrigan

And one more thought. Right now Gosu reserves one dedicated OpenAL channel for songs. That prevents a situation where Song.play silently fails when many samples are playing already.

One clean solution would be to pass an optional priority into every play call and samples with a higher priority can kick samples with a lower priority out even while they're playing. But...I guess we can push this issue back until someone actually runs into this situation :)

jlnr avatar Mar 13 '18 21:03 jlnr

Another thing that I'll have to rethink with this PR is the "automagic handling" of Gosu::Song in the iOS/UIKit port:

https://github.com/gosu/gosu/blob/master/src/GosuViewController.cpp#L108-L128

Both the code and logic are ancient. I need to work on that part anyway because it's using deprecated APIs.

jlnr avatar May 05 '18 13:05 jlnr