PDA

View Full Version : Prometheus Audio - First draft



code_glitch
10-10-2010, 04:27 PM
Just rolled this out and I must say, I'm liking this simplistic idea. Its based on a version of the Bass library which I have compiled on both windows and ubuntu 10.04TLS and I believe there should be no problems with Mac OS X either. A quick demo program from me testing out playing an audio file:



program demo;

uses
Prometheus_Audio;

var
Music: Audio;

begin
PrometheusAudio_Start();
Music := LoadAudio('song.mp3');
Music.Play();
readln();
Music.Pause();
readln();
Music.Resume();
readln();
Music.Stop();
end.


And yes it compiles and runs.

cheers,
code_glitch

PS: Prometheus_Audio gets released in a few days.

paul_nicholls
10-10-2010, 11:17 PM
Hey chief :)

Nice :)

One issue I can see, if we used that in a commercial pascal program, we would get in trouble, wouldn't we? BASS being not free if in commercial programs?

cheers,
Paul

WILL
10-10-2010, 11:49 PM
One issue I can see, if we used that in a commercial pascal program, we would get in trouble, wouldn't we? BASS being not free if in commercial programs?

You'd have to purchase a license from the Bass developers. Then you could sell your game. The Shareware License goes for 125 Euros and it offers...

The "shareware" licence allows the usage of BASS in an unlimited number of your shareware products, which must sell for no more than 40 Euros each. If you are an individual (not a corporation) making and selling your own software (and its price is within the limit), this is the licence for you.

http://www.un4seen.com/

code_glitch
11-10-2010, 05:35 AM
The idea is to use bass as a base (excuse the pun) to get prometheus running, then once I make a public release of the audio units, hunt out some openal code or similar to play audio. The user side interface wont change, thus giving me extra time to test out what would and wouldnt be easy for newbies to grasp. Once I have that, I will definitely change over to more open source alternatives.

cheers,
code_glitch

paul_nicholls
11-10-2010, 05:54 AM
Fair enough :)

cheers,
Paul

chronozphere
11-10-2010, 07:06 AM
The idea is to use bass as a base (excuse the pun) to get prometheus running, then once I make a public release of the audio units, hunt out some openal code or similar to play audio. The user side interface wont change, thus giving me extra time to test out what would and wouldnt be easy for newbies to grasp. Once I have that, I will definitely change over to more open source alternatives.

cheers,
code_glitch

Hmm.. It seems to me that you are wasting your time with BASS. My experience is that it is more work to make an API do what you want, then to write the wrapper around it. If you get to the point where everything works perfectly with BASS and then remove BASS, you are only left with an empty wrapper. It might be that BASS is super-easy to use and has no pitfalls/problems. In that case, I might be mistaking.

So, why not use OpenAL from the start? It is more work, but when it's done, you have finished your audio module. If it appears that you have to change your design because of OpenAL, your BASS implementation is not very usefull.

Just my $0.02. ;)

BTW: Does BASS work on Linux? I thought it was targeted at windows and mac.

WILL
11-10-2010, 12:17 PM
Well working within the concept that this is meant to be easy implementation of audio in a beginner's game(s), There should be an audio format or formats which has some basic compression and can be loaded and played by the game library. Rather than supporting all kinds of formats, why not just support one and have a tool that is capable of converting all the other formats into whatever container you wish them to use in the game library.

For example, DelphiX had it's own graphics and sound container formats, which it could load and then play back sounds or music from them as needed. It was simple and lots of people loved the game components for it. This approach could work just as well here so long as your tool can convert all of the most popular music formats into this one format and was able to pack them into your easy to manage container for use in games using the library.

This eliminates the hassle of multiple format loading and bouncing between audio headers and API. Just build it for one format, then create your format for an audio container. From there all you need to do is make the converter/container tool.

If you are looking for audio mixing, either SDL or OpenAL are both cross-platforms and the easiest to work with. OpenAL is 3D already and it's flexibility makes it very powerful to work with. It'll also take advantage of EAX hardware acceleration as well if it exists. Noeska makes the best OpenAL headers that I know of. http://www.noeska.com/doal/