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
Odd noise at start and end of a wave file Posted by thokaske on 8 Oct 2001 at 3:28 AM
Hi,

I am trying to write a program in Visual C++ that is supposed to play a wav file. It works fine except that it produces a crackling noise at the start and end. The file is OK (I used Winamp to verify that).
Does anyone have an idea what the problem might be

thx,
Thorsten

Report
Re: Odd noise at start and end of a wave file Posted by WEBMASTER on 8 Oct 2001 at 5:43 AM
Perhaps the samplefile(.WAV) that you try to play has a header in front in the beginning of the file that your player tries to play and can't skip?


/WEBMASTER


Report
Re: Odd noise at start and end of a wave file Posted by thokaske on 8 Oct 2001 at 6:44 AM
The sample was recorded with a (very good) microphone.
How can I find out if there is a header ?

Report
Re: Odd noise at start and end of a wave file Posted by WEBMASTER on 8 Oct 2001 at 7:00 AM
IT all depends on the format of the sample-file that you try to play and what kind of format your player wants as input.

You could always try to cut away the first for example 128 or 256 bytes of the file to see if it helps!

You could also import the sample in a sample editor and save it as a RAW sample file to make sure that you don't have any header.




/WEBMASTER


Report
Re: Odd noise at start and end of a wave file Posted by Sephiroth2 on 12 Oct 2001 at 3:25 PM
: Hi,
:
: I am trying to write a program in Visual C++ that is supposed to play a wav file. It works fine except that it produces a crackling noise at the start and end. The file is OK (I used Winamp to verify that).
: Does anyone have an idea what the problem might be
:
: thx,
: Thorsten
:
Not all of the WAV file is data that is to be played.
The file begins with "RIFF"
Then comes the length of the file. Then each chunk of the file comes. First there are 4 bytes to identify the chunk, and then, the length of the chunk comes.
The relevant chunks are "fmt " (it is a WAVEFORMATEX structure) and "data" which contains the data.

Report
Re: Odd noise at start and end of a wave file Posted by membruce on 20 Oct 2001 at 6:24 PM
I have also seen this happen. The experience is from micro controllers and may not apply hear. When you start sending the wave the speaker is a 0 Volts and at rest. If either the baseline is not at 0 or you on a portion of the wave the speaker is suddenly set to this voltage. This produces a pop at the beginning. A similar effect can occur at the end of the play. Again, this may not apply hear but I thought it was worth mentioning.

Good Luck
Bruce


: Hi,
:
: I am trying to write a program in Visual C++ that is supposed to play a wav file. It works fine except that it produces a crackling noise at the start and end. The file is OK (I used Winamp to verify that).
: Does anyone have an idea what the problem might be
:
: thx,
: Thorsten
:





 

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.