Article View: borland.public.cppbuilder.multimedia
Article #846Re: BPM
From: Michel Leunen
Date: Tue, 11 Feb 2003 08:28
Date: Tue, 11 Feb 2003 08:28
40 lines
1963 bytes
1963 bytes
In article <3e47da06@newsgroups.borland.com>, min_char@yahoo.gr says...
> Do anyone knows how to detect the bits per minutes of an audio file?
> Any help?
Both .wav and .mp3 files have a header with the information you're
looking for. For instance, wav file header begins with the following:
// This is the start ID of a Wave file
// must contains 'RIFF' and 'WAVE'
char startID[12];
//FormatChunk
struct FormatChunk
{
char chunkID[4]; //contains 'fmt ' with no
ending \0
long chunkSize;
short wFormatTag;
unsigned short wChannels;
unsigned long dwSamplesPerSec;
unsigned long dwAvgBytesPerSec;
unsigned short wBlockAlign;
unsigned short wBitsPerSample;
// Note: there may be additional fields here, depending upon
wFormatTag.
};
Take a look at www.wotsit.org for informations about the format of each
file type.
Michel
--
-------------------------------
Michel Leunen
http://www.leunen.com/cbuilder/
-------------------------------
Technical Details
Message-ID:
<MPG.18b2d29522a856269896c3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3e47da06@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d0fc,1f4459c20f0040c8 X-Google-Attributes: gid10d0fc,public X-Google-ArrivalTime: 2003-02-11 00:35:06 PST From: Michel Leunen <mleu@skynet.be> Newsgroups: borland.public.cppbuilder.multimedia Subject: Re: BPM Date: Tue, 11 Feb 2003 09:28:27 +0100 Message-ID: <MPG.18b2d29522a856269896c3@newsgroups.borland.com> References: <3e47da06@newsgroups.borland.com> Organization: www.leunen.com/cbuilder/ X-Newsreader: MicroPlanet Gravity v2.50 NNTP-Posting-Host: 217.136.243.131 X-Trace: newsgroups.borland.com 1044952128 217.136.243.131 (11 Feb 2003 00:28:48 -0800) Lines: 40 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail