Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#4783 - 27/02/2000 05:02 How to play sound?
kim
member

Registered: 21/07/1999
Posts: 140
Loc: Helsinki, Finland
Now that we have a code snippet for setting pixels to screen, know how to interpret the front panel buttons & remote - we have no information on how to put raw sound data to soundcard and play it.

Is there any chance of revealing the mystery of empeg's sound card functionality? Just a small low-level example would be enough, just to see where the sound card buffers are and how to play them.

I see that it's not as straight forward as setting pixels to screen as it probably needs an own interrupt/process for taking care that playing buffers always has enough data, and so on. But anyway it would be nice to get some sound out of empeg in own programs (besides the DSP beeps ;).

Kim


Top
#4784 - 27/02/2000 13:07 Re: How to play sound? [Re: kim]
altman
carpal tunnel

Registered: 19/05/1999
Posts: 3457
Loc: Palo Alto, CA
Errr, there is info: you open /dev/audio and write data to it. There are lots of ioctls (eg to unmute the output - I think these are covered on the developer site) but basically you just write data to it in 4608 byte chunks and it deals with the rest.

Hugo



Top
#4785 - 27/02/2000 13:40 Re: How to play sound? [Re: kim]
Verement
journeyman

Registered: 02/09/1999
Posts: 97
Loc: Boston, MA, US
I just added some sample code to the developer site that may be illuminating.

There is also a lot of good information about the Open Sound System available online for the general API.

-v


Top
#4786 - 28/02/2000 04:34 Re: How to play sound? [Re: Verement]
kim
member

Registered: 21/07/1999
Posts: 140
Loc: Helsinki, Finland
Well - you guys see that I'm more a Win32 developer than a Linux. I've used to write hundreds of lines of code to get a beep out of a soundcard ;)

And thanks for the sample code - I'll be looking for my empeg to say something nice when I turn it on :)

By the way, as the developer site already contains sample code, it might be a good idea to put a place where people could send their own empeg programs as binaries as well. For people who don't want to compile the programs and for people who don't want to distribute their sources.

It wouldn't have to be that far away even a 3rd party to develop horizontal tetris or whatever nice things - I already have a neat boot loader ;)

Kim


Top