Mp3 Cracking Sound

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

omuyelijah

Thread Starter
Joined
Jan 10, 2006
Messages
120
Hi All,

There is an issue with my code that converts
.wav to .mp3 files. Right now, the code converts
most wave files and it plays well (the
generated mp3 file is only a dump of conversion
without the MP3 header section written
nevertheless, it plays on WMP11) but there is this
issue with the code: Given a wave file with the
following specifications

wFormatTag=1; nChannels=2; nSamplesPerSec=44100
nAvgBytesPerSec=176400; nBlockAlign=4;
wBitsPerSample=16; cbSize=0;

My code converts to mp3 file with the following
specifications

wFormatTag=85; nChannels=2; nSamplesPerSec=22050
nAvgBytesPerSec=7000; nBlockAlign=1;
wBitsPerSample=0; cbSize=12;
wID=1; fdwFlags=2; nBlockSize=182;
nFramesPerBlock=1; nCodecDelay=1460
--Generated MP3 format sound bit rate is 56kbps

but when mp3 file is played, it is sort of distorted with
prominent annoying sounds (similar to continuous electric
sparks and sharp cuts) and I get 2 hear faintly,
the expected sound output.

ABOUT D CODE
------------
I use acmFormatSuggest(...) to request the destination mp3
format b4 acmStreamOpen() is called. if acmFormatSuggest()
fails, program is terminated. Other acmXXX calls return
w/o error.
The acmFormatSuggest(...) call is not specific 2 any ACM driver,
(i.e. 2nd parameter is NULL) but judging from Device Manager,
I think Fraunhofer IIS (advanced) is used cos its of priority
(10) higher than other mp3 ACM Codec drivers. I can try other
drivers by changing priorities 4rm device manager.

At first, I thought its bcos of low bit rate of 56kbps cos
for MP3s, low bit rate is poor sound quality and low file size.
Can any help?

A second issue I'll like 2 share is that trying out other MP3 ACM
drivers is sometimes problematic.

When I used Fraunhofer MP3 IIS (professional), it produces
an mp3 file of size 0, provided with a .wav file of the above
provided specs. After much investigation, the cbDstLength
field of the buffer header (ACMSTREAMHEADER) is zero after
acmStreamConvert(...) was called hence it couldn't write
anything to the created mp3 file. This means though
acmStreamConvert(...) returned mmresult=0, it couldn't convert.

LAME ACM MP3 CODEC version 0.9.2-3.98( beta 6 Dec 17, 2007),
could not convert any of my sample (recorded) wave files except
for one of the above specified wave format but like usual, it
produces the annoying sound when mp3 file is played.

I'll appreciate meaningful help from anyone.

Regards.
 
Joined
Nov 22, 2005
Messages
869
Can you be more specific. Are you using an external compressor or are you trying to write your own?

Also does this problem when you're using other 3rd parties with the compressor?
 

omuyelijah

Thread Starter
Joined
Jan 10, 2006
Messages
120
I don't know what u mean by an external compressor. Windows (XP or Vista) would usually come with the Fraunhofer IIS MP3 ACM codecs installed. I only installed LAME MP3 ACM Codec from the .net
Also, I'm aint trying 2 write my own decompressor.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top