Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Playing a wave file using C

Status
Not open for further replies.

gauravsarode

Junior Member level 1
Joined
Oct 25, 2005
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,449
Hi all,


I want to play a wave file using C program . I am using a 8051 . Can anyone help?

I want a cross compiler for 8051 can ne one tell me from where i can download it?

Bye.
 

throwaway18

Advanced Member level 2
Joined
Jun 9, 2005
Messages
596
Helped
101
Reputation
202
Reaction score
24
Trophy points
1,298
Location
Kent, UK
Activity points
8,365
The format of .wav files containing PCM data (a stream of sample amplitudes) is reasonably well documented. You can find the information on the web.

.wav files can contain compressed data but you rarely encounter them.

PCM .wav files can contain audio at different sample rates and sample resolution. You probably want to pick just one type of .wav files that you support.

You might want to use a PC to extract the raw sample data and store in whatever memory you are using with your 8051. If you want to support anything other than linear PCM .wav files you could use one of the open source audio packages such as osalp that has converters for many audio formats.

Getting the samples from your memory device and playing them is hardware specific. If you have a general purpose DAC you will have to get do the timing with software counters or whatever internal timers your 8051 compatible chip has. You can also get DAC's intended for audio that can buffer samples and use a seperate clock.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top