Copyright © 2006 - 2008 MultiMedia Soft 
Return to Table of contents  
 
 
How the Sound Activation System works 
 
Sound Activation System allows skipping silent passages during a recording session: if the control's property DiscardSilence has been set to True, the control will automatically recognise silent data and will not store them inside the output file or in memory: the actual threshold that discriminates silent data from audible data is fixed through the SilenceThreshold property; changing the SilenceMinLength property (by default set to 0 milliseconds), you can control the minimal silence length, expressed in milliseconds, under which a silent period is still not considered really silent. 
 
The use of Sound Activation System is especially useful in the following situations: 
  • when the control is recording streaming data from the Internet and a net congestion stops the stream, allowing to avoid having spots without audible sound on the final output. 
  • when you must optimise the memory or disk consumption during silent periods. 
  • when you are monitoring an input channel for audible data (for example a microphone) and have no need to record silent periods: in this case the control has the optional ability to automatically create a log file that will report the exact recording time and silence skipping time: all you have to do is to set the DiscardSilenceLogFile property with a valid absolute pathname. This log file will have a format as shown below: 
  • [Recording start]  1/17/2006 14:19:22 {453463328} 
    [Silence start]    1/17/2006 14:19:22 {453463437} 
    [Silence end]      1/17/2006 14:19:25 {453466437} 
    [Silence start]    1/17/2006 14:19:26 {453467031} 
    [Silence end]      1/17/2006 14:19:31 {453472031} 
    [Silence start]    1/17/2006 14:19:31 {453472140} 
    [Silence end]      1/17/2006 14:19:38 {453479234} 
    [Silence start]    1/17/2006 14:19:38 {453479343} 
    [Silence end]      1/17/2006 14:19:39 {453479843} 
    [Silence start]    1/17/2006 14:19:39 {453480437} 
    [Silence end]      1/17/2006 14:19:50 {453490843} 
    [Silence start]    1/17/2006 14:19:50 {453491531} 
    [Silence end]      1/17/2006 14:19:59 {453500140} 
    [Silence start]    1/17/2006 14:20:00 {453501031} 
    [Silence end]      1/17/2006 14:20:03 {453504531} 
    [Recording end]    1/17/2006 14:20:04 {453504640} 
     
    The structure of the file should be quite self-explanatory: on each line the log file logs the exact date and time of recording start ([Recording start]) and recording end ([Recording end]) and all the transitions from silent data ([Silence start]) to audible data ([Silence end]) and between {} characters reports the exact number of milliseconds returned by a call to the GetTickCount Windows API: as you may know, the GetTickCount function retrieves the number of milliseconds that have elapsed since the system was started. 
     
    When the DiscardSilence property has been set to True and the recording session finds silent data, the container application is notified through the RecordingSilentData event; when the recording session finds again audible data, the container application is notified through the RecordingAudibleData event. 
     
    IMPORTANT: When using the Sound Activation System is highly recommended storing recorded sound data on a file instead of a memory buffer. 
     
     
     
     
     
     
     
     
     
     
    Copyright © 2006 - 2008 MultiMedia Soft 
    Return to Table of contents