Archived

This topic is now archived and is closed to further replies.

tsuraan

outputting raw sound

Recommended Posts

tsuraan    122
not really sure how to phrase this so it will make sense, but here goes... I''d like to play with generating music fractally. So, I''m thinking that I''d probably need some sort of sound library that allows for a more direct access to the sound buffer. Most of the libraries that I''ve seen like to take .wav files (or mp3 or ogg, &c), but that really won''t work here, right? Does anyone know of a library that allows you to just make some sort of buffer, and send it to the sound driver?

Share this post


Link to post
Share on other sites
tsuraan    122
person: I''m using linux, so I''m pretty sure that won''t work

SA-Magic: I''m not sure if it''s a wave sound or what. What I''m thinking is that with images, I can make a buffer of RGB values and then put them on the screen using glPutPixels (or something). Is there an analogue for sound?

Share this post


Link to post
Share on other sites
a person    118
next time you should mention that, you cant expect ppl to read minds. i am afraid most ppl here are using windows, and its the default for me when someone asks a question. most linux users are pretty good about knowing how to use a search engine.

you can use /dev/dsp directly. its simple to use. like all linux hardware access you do it by open()ing, set options via ioctl() and write() the data. when done close() it.

another method is forking play and pipe your audio data to it. while i dont have it installed, many apps allow you to set them to recieve data from stdin. this way you can string htem together wasily.

openal is yet another option.

there are more, but you get the idea. next time please specify your platform.

Share this post


Link to post
Share on other sites
Drakar    122
By god "a person" he didn''t specify his platform making you look quit the fool! HAHAHA

chill out man.........

Share this post


Link to post
Share on other sites
tsuraan    122
person: thanks. I hadn''t thought of actually opening the dsp... Sounds like it''s worth a shot. And yeah, I guess specifying a platform would probably help in the future

Share this post


Link to post
Share on other sites