C# 클래스 Bloom.Edit.AudioRecording

This is a clean back-end service that provides recording to files via some http requests from the server. It also delivers real time microphone peak level numbers over a WebSocket. The client can be found at audioRecording.ts.
상속: IDisposable
파일 보기 프로젝트 열기: BloomBooks/BloomDesktop

공개 프로퍼티들

프로퍼티 타입 설명
PathToCurrentAudioSegment string
PathToTemporaryWav string

Private Properties

프로퍼티 타입 설명
CleanUpAfterPressTooShort void
CreateRecorder void
GetPathToSegment string
HandleCheckForSegment void
HandleDeleteSegment void
HandleEnableListenButton void
HandleEndRecord void
OnStartRecordingTimer_Elapsed void
Recorder_Stopped void
ReportNoMicrophone void
SetPeakLevel void
TestForTooShortAndSendFailIfSo bool

공개 메소드들

메소드 설명
AudioRecording ( BookSelection bookSelection, BloomWebSocketServer bloomWebSocketServer ) : SIL.Media.Naudio
BeginMonitoring ( ) : void

Used to initiate sending the PeakLevelChanged notifications. Currently this typically happens when the Recorder instance is created, which is usually when the talking book tool asks for the AudioDevicesJson. This is not very intuitive, but it's the most easily detectable event that indicates that the talking book tool is actually active.

Dispose ( ) : void
HandleAudioDevices ( ApiRequest request ) : void

Returns a json string like {"devices":["microphone", "Logitech Headset"], "productName":"Logitech Headset", "genericName":"Headset"}, except that in practice currrently the generic and product names are the same and not as helpful as the above. Devices is a list of product names (of available recording devices), the productName and genericName refer to the current selection (or will be null, if no current device).

HandleCurrentRecordingDevice ( ApiRequest request ) : void
HandleStartRecording ( ApiRequest request ) : void
RegisterWithServer ( EnhancedImageServer server ) : void

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

비공개 메소드들

메소드 설명
CleanUpAfterPressTooShort ( ) : void
CreateRecorder ( ) : void
GetPathToSegment ( string segmentId ) : string
HandleCheckForSegment ( ApiRequest request ) : void
HandleDeleteSegment ( ApiRequest request ) : void

Delete a file (typically a recording, as requested by the Clear button in the talking book tool)

HandleEnableListenButton ( ApiRequest request ) : void
HandleEndRecord ( ApiRequest request ) : void
OnStartRecordingTimer_Elapsed ( object sender, EventArgs e ) : void
Recorder_Stopped ( IAudioRecorder arg1, ErrorEventArgs arg2 ) : void
ReportNoMicrophone ( ) : void
SetPeakLevel ( SIL.Media.Naudio.PeakLevelEventArgs args ) : void
TestForTooShortAndSendFailIfSo ( ApiRequest request ) : bool

메소드 상세

AudioRecording() 공개 메소드

public AudioRecording ( BookSelection bookSelection, BloomWebSocketServer bloomWebSocketServer ) : SIL.Media.Naudio
bookSelection Bloom.Book.BookSelection
bloomWebSocketServer Bloom.Api.BloomWebSocketServer
리턴 SIL.Media.Naudio

BeginMonitoring() 공개 메소드

Used to initiate sending the PeakLevelChanged notifications. Currently this typically happens when the Recorder instance is created, which is usually when the talking book tool asks for the AudioDevicesJson. This is not very intuitive, but it's the most easily detectable event that indicates that the talking book tool is actually active.
public BeginMonitoring ( ) : void
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

HandleAudioDevices() 공개 메소드

Returns a json string like {"devices":["microphone", "Logitech Headset"], "productName":"Logitech Headset", "genericName":"Headset"}, except that in practice currrently the generic and product names are the same and not as helpful as the above. Devices is a list of product names (of available recording devices), the productName and genericName refer to the current selection (or will be null, if no current device).
public HandleAudioDevices ( ApiRequest request ) : void
request Bloom.Api.ApiRequest
리턴 void

HandleCurrentRecordingDevice() 공개 메소드

public HandleCurrentRecordingDevice ( ApiRequest request ) : void
request Bloom.Api.ApiRequest
리턴 void

HandleStartRecording() 공개 메소드

public HandleStartRecording ( ApiRequest request ) : void
request Bloom.Api.ApiRequest
리턴 void

RegisterWithServer() 공개 메소드

public RegisterWithServer ( EnhancedImageServer server ) : void
server Bloom.Api.EnhancedImageServer
리턴 void

프로퍼티 상세

PathToCurrentAudioSegment 공개적으로 프로퍼티

public string PathToCurrentAudioSegment
리턴 string

PathToTemporaryWav 공개적으로 프로퍼티

The file we want to record to
public string PathToTemporaryWav
리턴 string