![]() |
Halyri - Mobiili
0.9
|
Class for capturing PCM audio fragments from XNA microphone and processing them as WAVE files. More...
Public Member Functions | |
WavAudioSampleCapturer (Microphone mic) | |
Instantializes a new WavAudioSampleCapturer using the provided Microphone instance. The Microphone must new initalized, but not in use or started. More... | |
void | StartCapture () |
Stars capturing from the XNA Microphone. FrameworkDispatcher.Update needs to have been called at least once prior to this operation and needs to be called reqularly during recording. More... | |
void | StopCapture () |
Stops capturing from the XNA Microphone. More... | |
void | UpdateSampleParameters (int sampleLengthMilliSeconds) |
Sets the length of fragments to be captured from the Microphone. Valid range is 50 to 1000 milliseconds. More... | |
Public Attributes | |
WaveSegmentCaptured | WaveSegmentCapturedEvent |
PcmSegmentCaptured | PcmSegmentCapturedEvent |
Properties | |
int | AudioSampleMilliSeconds [get] |
int | SampleRate [get] |
int | SampleSizeBytes [get] |
Private Member Functions | |
int | CalculateSampleSize () |
Gets bytes per 200ms and samples per 200ms and then calculates bytes per sample. More... | |
void | Microphone_BufferReady (object sender, EventArgs e) |
Handles new audio PCM buffers from the XNA Microphone. Adds WAVE header to the using the WaveFileHeader class and generates the AudioFrameCapturedHandler event. More... | |
Private Attributes | |
int | maxAudioSampleMilliSeconds = 1000 |
int | minAudioSampleMilliSeconds = 100 |
int | audioSampleMilliSeconds = 500 |
int | sampleRate |
int | sampleSizeBytes |
byte[] | microphoneBuffer |
Microphone | microphone |
Boolean | started |
Class for capturing PCM audio fragments from XNA microphone and processing them as WAVE files.
<author>Veli-Mikko Puupponen</author>
Halyri.AudioVideoManagers.WavAudioSampleCapturer.WavAudioSampleCapturer | ( | Microphone | mic | ) |
Instantializes a new WavAudioSampleCapturer using the provided Microphone instance. The Microphone must new initalized, but not in use or started.
mic |
|
private |
Gets bytes per 200ms and samples per 200ms and then calculates bytes per sample.
|
private |
Handles new audio PCM buffers from the XNA Microphone. Adds WAVE header to the using the WaveFileHeader class and generates the AudioFrameCapturedHandler event.
sender | Object sending the event |
e | Eventargs for the event, not used |
void Halyri.AudioVideoManagers.WavAudioSampleCapturer.StartCapture | ( | ) |
Stars capturing from the XNA Microphone. FrameworkDispatcher.Update needs to have been called at least once prior to this operation and needs to be called reqularly during recording.
void Halyri.AudioVideoManagers.WavAudioSampleCapturer.StopCapture | ( | ) |
Stops capturing from the XNA Microphone.
void Halyri.AudioVideoManagers.WavAudioSampleCapturer.UpdateSampleParameters | ( | int | sampleLengthMilliSeconds | ) |
Sets the length of fragments to be captured from the Microphone. Valid range is 50 to 1000 milliseconds.
sampleLengthMilliSeconds | Length of single captured audio fragment in milliseconds |
|
private |
|
private |
|
private |
|
private |
|
private |
PcmSegmentCaptured Halyri.AudioVideoManagers.WavAudioSampleCapturer.PcmSegmentCapturedEvent |
|
private |
|
private |
|
private |
WaveSegmentCaptured Halyri.AudioVideoManagers.WavAudioSampleCapturer.WaveSegmentCapturedEvent |
|
get |
|
get |
|
get |