Page 1 of 1

Help with Audio...

Posted: Sat May 21, 2011 5:47 am
by jeslar360
I was wondering if anyone here had enough experience with OpenAL, to help me?

I need to try and come up with something that will function like DeMP3 (Which uses mciSendString_() API) to control MP3 files...but in this case I need to be able to have the same control over Ogg and FLAC files... I don't know if it would help if I posted the DeMP3 source file, or not...

And if it could be made so I could play an Ogg or FLAC file from memory, without having to save it to the HDD...that would be better. Don't get me wrong, I know PB has the sound decoder...but the built sound functions don't give me nearly enough control. I need to be able to speed up as well as slow down the audio playing, keep track on a Millisecond Basis of where in the file the play pointer is...and be able to play the file from Millisecond A to Millisecond B...so if an OpenAL based version of DeMP3 could be made for audio formats like Ogg/FLAC...it would be a HUGE plus...

[EDIT] I am wondering though, if it might make more sense to use SDL...opinions and help will be greatly appreciated![/EDIT]

Re: Help with Audio...

Posted: Mon May 23, 2011 2:01 pm
by mikejs
Would BASS do the job?

http://www.un4seen.com/bass.html

It includes a library for use with PB, supports all the formats you mention (either natively or with an addon), and I think it can do the fine millisecond control you're after. Not tried that myself though.

Re: Help with Audio...

Posted: Mon May 23, 2011 5:08 pm
by jeslar360
Bass may be able to do what I am looking for, I really do not know.

The problem is, the licensing. This project, when done, is intended to be commercial in nature...otherwise, I would not have had a problem using BASS, or FMOD

I do not have the money to buy a Bass commercial license, so have avoided these because I don't want to have to write the audio control twice.

I can use MP3 with the built in API functions in Windows (Using the MOVIE functions) without fear of license, because DirectShow would be doing the decoding, not my program. But I really want this to be Multi Platform, so MP3 will be a last resort.

That is why I need to use either OpenAL, or SDL...if it can be managed.

Re: Help with Audio...

Posted: Mon Jun 20, 2011 5:49 pm
by jeslar360
I have placed an add on vWorker (formerly Rent-A-Coder) to help fix this issue, on a cross platform basis, using the media backends that PureBasic already uses, in the hopes of being able to tie the Built In functions, to the new ones. (DirectX/DirectShow for Windows, SDL for Mac and Linux). IF someone manages to do this, I would have no problem donating the code to Fred, to include the extended functionality in official PureBasic releases...