Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Request : Sound Frequency ...

Author
Message
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 11th Dec 2012 06:11
As already asked before (http://forum.thegamecreators.com/?m=forum_view&t=193630&b=41) (http://code.google.com/p/agk/issues/detail?id=230),

Is there a chance too see this kind of commands soon ?
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 11th Dec 2012 16:32
The problem is the usual cross-platform issues. OpenAL is quite powerful and should be usable for T2/T3 - and I assume is used at the moment by AGK.

A lot depends upon what you want to do with it. Complex mixing and pitch-shifting is fairly processor-intensive. However, I did it on CDTV and CD32 on slow processors by today's standards - but that was not with complex graphics operations going on.

If it's a simple case like Play This Sample At 480 Hz, that's not too bad. Getting seamless pitch changes for car engines is not trivial. I programmed all the interactive audio stuff for the London Transport Museum when it opened. In the Optare bus, you could simulate driving it. When you used the accelerator it had to "know" when the automatic gear would change, and then do the correct audio transition to the next ratio, without jumping or pops and clicks.

This looks possible in OpenAL, but I can't see it ever being easily possible in AppGameKit Basic. Play X at Y frequency could be implemented quite easily. For anything fancy you need low-level access to the audio buffers and very fast event callbacks or interrupts.

The simplest (!) way to do it would actually be using a Midi playback system. But - I've read the warnings - this is still going to eat CPU time.

If you're on Windows or a Mac, it's not too big a problem, but some plastic phone with a 1.5-bit processor is going to die!

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL

Login to post a reply

Server time is: 2024-11-24 04:10:57
Your offset time is: 2024-11-24 04:10:57