Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Silence Detection MP3

Reply
Thread Tools

Silence Detection MP3

 
 
Senger
Guest
Posts: n/a
 
      03-10-2006
How I can detect a silence in MP3 File??

 
Reply With Quote
 
 
 
 
Ben Pope
Guest
Posts: n/a
 
      03-10-2006
Senger wrote:
> How I can detect a silence in MP3 File??


Your speakers don't make any noise when playing it at that point?

I'm not sure how your question relates to C++, perhaps you should find a
specific library that supports MP3 and then ask in a newsgroup or forum
where that library is topical.

Ben Pope
--
I'm not just a number. To many, I'm known as a string...
 
Reply With Quote
 
 
 
 
Tomás
Guest
Posts: n/a
 
      03-10-2006
Senger posted:

> How I can detect a silence in MP3 File??


Assuming 16-Bit Audio:


typedef unsigned short uint16;

bool IsSampleSilent(uint16 sample)
{
return sample;
}


-Tomás
 
Reply With Quote
 
Rolf Magnus
Guest
Posts: n/a
 
      03-11-2006
Tomás wrote:

> Senger posted:
>
>> How I can detect a silence in MP3 File??

>
> Assuming 16-Bit Audio:
>
>
> typedef unsigned short uint16;
>
> bool IsSampleSilent(uint16 sample)
> {
> return sample;
> }


Only for a (quite odd) special case of silence.

 
Reply With Quote
 
Senger
Guest
Posts: n/a
 
      03-13-2006
But It is possible to found the silent without processing the mp3 file?
For example:

ptr2 = pScriptFilepath;
fp = fopen(ptr2, "rb");
if(fp == NULL)return false;

fseek(fp,0,SEEK_END);
filesize = ftell(fp);
data = malloc(filesize);
fseek(fp,0,SEEK_SET);
bufsize = filesize / 8;
++bufsize;
bufsize *= 8;

memScriptFile = (char *) new char [bufsize];
if(memScriptFile == NULL)
{
fclose(fp);
return 0;
}

cChars = fread(memScriptFile, 1, filesize, fp);
nScriptFileSize = cChars;
fclose(fp);

for (int k=0; k<cChars; k++){
//read byte and verify if is silent.
if is silent, record the position in array...
}
I don´t now if this solution if is possibile because the MP3 file is a
encorder file....
I will try with directx, but i can´t find any kind of help to use
them....

Tks!!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3GP to MP3 Convert 3GP to MP3 using 3GP MP3 Converter music-fan DVD Video 0 12-24-2009 04:58 AM
Silence detection Martin UK VOIP 3 02-04-2006 11:13 AM
Sipgate and Asterisk, Calls cut if silence detected Sparks UK VOIP 1 07-12-2005 09:03 AM
DVD Verdict reviews: LOVING WALTER, THE PACT OF SILENCE, and more! DVD Verdict DVD Video 0 11-26-2003 10:04 AM
Does G.711 have silence suppression? Alex VOIP 3 09-05-2003 03:39 AM



Advertisments