1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Mp3 Cracking Sound

Discussion in 'Software Development' started by omuyelijah, Mar 27, 2008.

Thread Status:
Not open for further replies.
  1. omuyelijah

    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.
     
  2. blaqDeaph

    blaqDeaph

    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?
     
  3. omuyelijah

    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.
     
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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/697582

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice