OpenAL - change playback speed and pitch

I think the playback speed of a sound can be changed using the AL_PITCH and AL_VELOCITY source properties

For example, this will make a source play at half speed:

alSourcef(source, AL_PITCH, 0.5f);

Could we please have support to allow us to specific the playback speed and pitch of music?

TIA!!! You rock! [import]uid: 9371 topic_id: 7297 reply_id: 307297[/import]

+1
also pan
[import]uid: 9158 topic_id: 7297 reply_id: 25822[/import]

+1

Hopefully this, and the ability to pitch-bend already playing sounds will be possible if/when we get full access to OpenAL. Right now, there’s no way (that I’ve found) to do things like realistic engine sounds for racing games. I had the same problem with Flash years ago. [import]uid: 32900 topic_id: 7297 reply_id: 28303[/import]

+1, need for the level ending or some “special” situation in the game [import]uid: 9190 topic_id: 7297 reply_id: 28465[/import]

+1. just to clarify: not asking for any kind of timestretching, just if you play the sound at a higher pitch it plays through faster. I believe this is actually generally achieved by keeping the sample playback rate of the system the same (eg 44100) but just skipping samples in the specific sound being pitched (or doubling with interpolation for playing slower) , but all this is probably built into OpenAL anyway [import]uid: 10744 topic_id: 7297 reply_id: 29266[/import]

I understand it probably require some time to add pitch changing and timestretching support.

However, as a first step, please at least add the panning [import]uid: 9158 topic_id: 7297 reply_id: 30252[/import]

Hey, im having trouble getting “alSourcef(source, AL_PITCH, 0.5f);” to work, do you think you might be able to post some sample code? [import]uid: 46742 topic_id: 7297 reply_id: 37230[/import]

+1 for simple pitch control at least. The more APIs to OpenAL directly the better.
Chris > alSourcef( source, AL_PITCH, 0.5f) is an example of C call to OpenAL, not a LUA code. So will not work on Corona. [import]uid: 48785 topic_id: 7297 reply_id: 37836[/import]