🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.multimedia
2 messages
2 total messages Started by Min Char Mon, 10 Feb 2003 16:58
BPM
#845
Author: Min Char
Date: Mon, 10 Feb 2003 16:58
4 lines
1035 bytes
Do anyone knows how to detect the bits per minutes of an audio file?
Any help?

Thanks
Re: BPM
#846
Author: Michel Leunen
Date: Tue, 11 Feb 2003 08:28
40 lines
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/
-------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads