Sound & Music

Moderators: Sephiroth
Number of threads: 611
Number of posts: 1220

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
how can i play .raw audio file in c or c++ program Posted by shivashankarn on 6 Apr 2004 at 3:43 AM

plz can any one guide me to play an raw audio file using c or c++ programs .and raw file should be played with some sampling frequency(8000).
Report
Re: how can i play .raw audio file in c or c++ program Posted by Jonathan on 6 Apr 2004 at 3:59 AM
: plz can any one guide me to play an raw audio file using c or c++ programs .and raw file should be played with some sampling frequency(8000).
:
What platform? If Windows or Linux, you can find examples of implementations of these things in the AMaMP source tree...

http://cvs.sourceforge.net/viewcvs.py/amamp/core/

Check amamp_io_win32wave.c for Win32 and amamp_io_devdsp.c for Linux. You basically need to read the data and write it to the appropriate place using APIs/system calls, so a lot of what is in these files you can ignore (e.g. sample rate conversion code).

Hope this helps,

Jonathan

###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.