473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

to read a .wav file using c program

anybody please tell me how to read a .wav file using c program.when i do with the fopen statement a null value is returned.please tell me solution.
Sep 3 '06 #1
6 15487
Banfa
9,065 Expert Mod 8TB
If you are getting NULL returned it is because the program was unable to open the file.

This could be because
  1. You have the name of thje file wrong in the function call
  2. You have the path to the file wrong in the function call
  3. Some other program already has the file open in a mode that is incompatable with the open mode you are trying to use. i.e. someone has it opened for read and you are trying to open it for write.

It is nothing to do with the fact it's a wav file.
Sep 3 '06 #2
D_C
293 100+
I actually wrote a C++ program to synthesize a tone. I haven't worked on it for a while, but if you have any .wav questions, I'll see what I can do to help you.
Sep 3 '06 #3
I actually wrote a C++ program to synthesize a tone. I haven't worked on it for a while, but if you have any .wav questions, I'll see what I can do to help you.
can u please provide me a very simple source code on how to read a .wav file using c and what the output will look like when the program is executed. treat me as i am a very beginner user of C programming. i am sorry if this question bother u.
Nov 9 '06 #4
baburk
111 100+
hai joby mathai

visit this site.

The wave code can abe to work only in win98.

http://www.shdon.com/view?cat=dos&doc=sound
Nov 15 '06 #5
While specifying path try "/" rather than "\".
Ex: If your file is in C:
Type c:/something.txt


@Banfa
Aug 30 '09 #6
JosAH
11,448 Expert 8TB
I do hope you realize you're responding to a thread that is almost three years old.

kind regards,

Jos
Aug 30 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: ZafT | last post by:
Thanks in advance for any tips that might get me going in the right direction. I am working on a simple exercise for school that is supposed to use read to read a file (about 10 MB). I am...
3
by: lpe540 | last post by:
Hi, I'm having trouble using istream to read in a file in its entirety on UNIX. I've written a dummy program that essencially reads in a file from stdin and writes it out to a file. When I cat a...
19
by: ranjeet | last post by:
Hay Guys can you all suggest me the points on the below issue Problem : The thing is that I have the data some thing like this. 1486, 2168, 3751, 9074, 12134, 13944, 17983, 19173, 21190,...
6
by: BenSimmons | last post by:
Hi i'm creating a program that reads various log files from another program (Find-a-Drug DC project). The problem is, when I read some of the logs I get the error This process cannot access the...
5
by: Sumana | last post by:
Hi All, We developed our project on VC++.Net console application to create image of disk and to write the image We are having problem with reading and writing the sector beyond 6GB Disk or...
2
by: sani8888 | last post by:
Hi everybody I am a beginner with C++ programming. And I need some help. How can I start with this program *********** The program is using a text file of information as the source of the...
3
by: Ray | last post by:
Hello World, I made a Windowsform that reads data from a CSV file. It works fine, but when I have read the data of a record I have to re-Debug the form to read another record. So when I put a...
9
by: flebber | last post by:
I was working at creating a simple program that would read the content of a playlist file( in this case *.k3b") and write it out . the compressed "*.k3b" file has two file and the one I was trying...
5
by: CSharp-Jay | last post by:
So I have been programming in C# on a personal level as of lately, and am curious about something. Lately I have been experimenting around with file create/write, etc. I can open and read the...
1
by: Sachin Garg | last post by:
I have a program which opens a fstream in binary input+output mode, creating the file if it doesn't exists. But writing doesn't works after reading, it must be something obvious that I am not aware...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.