is there a way to convert an audio file into a char array?

2009-12-31 Thread Gary Kline
In working toward my goal of writing a keyboard driver with builtin clicks, I'm investigating different angles. One would be to find existing audio files and catting then thru /dev/dsp. Is there a way of turning any audio file/format into a character

Re: is there a way to convert an audio file into a char array?

2009-12-31 Thread Lowell Gilbert
Gary Kline kl...@thought.org writes: In working toward my goal of writing a keyboard driver with builtin clicks, I'm investigating different angles. One would be to find existing audio files and catting then thru /dev/dsp. Is there a way of turning any audio

Re: is there a way to convert an audio file into a char array?

2009-12-31 Thread Gary Kline
On Thu, Dec 31, 2009 at 01:52:07PM -0500, Lowell Gilbert wrote: Gary Kline kl...@thought.org writes: In working toward my goal of writing a keyboard driver with builtin clicks, I'm investigating different angles. One would be to find existing audio files and catting then thru

Re: is there a way to convert an audio file into a char array?

2009-12-31 Thread Lowell Gilbert
Gary Kline kl...@thought.org writes: Yeah, I views the file with od -c; but wouldn't it be much faster to have the data file part of my test program than having to open, read, cat thru /dev/dsp each time, close file? I stole the cat from the KR book, and by reading

Re: is there a way to convert an audio file into a char array?

2009-12-31 Thread Roland Smith
On Thu, Dec 31, 2009 at 12:11:17PM -0800, Gary Kline wrote: Yeah, I views the file with od -c; but wouldn't it be much faster to have the data file part of my test program than having to open, read, cat thru /dev/dsp each time, close file? I stole the cat from the KR

Re: is there a way to convert an audio file into a char array?

2009-12-31 Thread Gary Kline
On Thu, Dec 31, 2009 at 09:44:33PM +0100, Roland Smith wrote: On Thu, Dec 31, 2009 at 12:11:17PM -0800, Gary Kline wrote: Yeah, I views the file with od -c; but wouldn't it be much faster to have the data file part of my test program than having to open, read, cat thru