Copyright © 2006-2018 MultiMedia Soft

CallbackForRecordersEvents delegate

Previous pageReturn to chapter overviewNext page

Remarks

 

Callback delegate invoked when an event related to a player occurs: this callback can be set through a call to the CallbackForRecordersEventsSet method.

 

For further details about callback delegates see the How to synchronize the container application with the API tutorial.

 

 

Syntax

 

[Visual Basic]

Public Delegate Sub CallbackForRecordersEvents (

ByVal nEvent as enumRecorderEvents,

ByVal nData1 as Int32,

ByVal nData2 as Int32,

ByVal nDataHigh3 as Int32,

ByVal nDataLow3 as Int32,

ByVal nDataHigh4 as Int32,

ByVal nDataLow4 as Int32

)


 

[C#]

public delegate void CallbackForRecordersEvents (

enumRecorderEvents nEvent,

Int32 nData1,

Int32 nData2,

Int32 nDataHigh3,

Int32 nDataLow3,

Int32 nDataHigh4,

Int32 nDataLow4

)


 

[C++]

public delegate void CallbackForRecordersEvents (

enumRecorderEvents nEvent,

Int32 nData1,

Int32 nData2,

Int32 nDataHigh3,

Int32 nDataLow3,

Int32 nDataHigh4,

Int32 nDataLow4

)


 

 

Parameter

Description

 

 

nEvent

Event reported by the recorder.

Supported values are the following:

Mnemonic constant

Value

Meaning with data parameters

 

 

 

EV_CD_RIPPING_PERC

0

Notifies the advancement status, expressed in percentage, of the current CD ripping session.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: Number representing the one-based index of the CD audio track that is being ripped.

nDataLow3: Number representing the ripping percentage.

EV_CD_RIPPING_ENCODE_PERC

1

Notifies the advancement status, expressed in percentage, of the track encoding performed during the current CD ripping session.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: Number representing the one-based index of the CD audio track that is being ripped.

nDataLow3: Number representing the encoding percentage.during a CD ripping session

EV_CD_RIPPING_SIZE

2

Occurs, during a CD ripping session, to notify the actual size of ripped sound data.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: Number representing the one-based index of the CD audio track that is being ripped.

nDataHigh4: Number representing the higher 32 bits of the size in bytes

nDataLow4: Number representing the lower 32 bits of the size in bytes

EV_CD_RIPPING_START

3

Occurs at the beginning of a new CD ripping session started through the CdRippingStart method.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: Number representing the one-based index of the CD audio track that is being ripped.

EV_CD_RIPPING_STOP

4

Occurs whenever a CD ripping session is completed or stopped through a call to the CdRippingStop method.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: Number representing the one-based index of the CD audio track that is being ripped.

nDataLow3: Boolean value stating if the CD ripping session was completed.Supported values are the following:

Value

Meaning

0

The ripping of the given CD track was interrupted: interruption's possible causes are the CD drive door being opened or a call to the CdRippingStop method. Check the LastError property value in order to see the last error.

1

The ripping of the given CD track was completed.

EV_CD_RIPPING_AUTOMATION_START

5

Occurs when a CD ripping automation session is started through the CdRippingAutomationExec method.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

EV_CD_RIPPING_AUTOMATION_TOTAL_PERC

6

Occurs, during a CD ripping automation session, to notify the actual total advancement percentage. The advancement related to each CD track added to the ripping automation session is notified through the EV_CD_RIPPING_PERC event.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nDataLow3: Number representing the automation percentage

EV_CD_RIPPING_AUTOMATION_STOP

7

Occurs when a CD ripping automation session is completed or stopped through the CdRippingStop method or after opening the CD drive door.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nDataLow3: Boolean value stating if the CD ripping automation session was completed.Supported values are the following:

Value

Meaning

0

The ripping automation session was interrupted: interruption's possible causes are the CD drive door being opened or a call to the CdRippingStop method. Check the LastError property value in order to see the last error.

1

The CD ripping automation was completed.

EV_CD_RIPPING_EXTRACT_PERC

8

Notifies the advancement status, expressed in percentage, of the track extraction performed during the current CD ripping session; during this phase, the CD track is extracted into a memory buffer in order to allow the volume level normalization process.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: Number representing the one-based index of the CD audio track that is being ripped.

nDataLow3: Number representing the track extraction percentage.

EV_CD_RIPPING_NORM_PERC

9

Notifies the advancement status, expressed in percentage, of the track normalization performed during the current CD ripping session.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: Number representing the one-based index of the CD audio track that is being ripped.

nDataLow3: Number representing the track normalization percentage.

EV_REC_START

10

Occurs at the beginning of a new recording session.

 

Involved data parameters: none

EV_REC_STOP

11

Occurs whenever a recording session is stopped through a call to the RecorderStop method or when an error occurs.

 

Involved data parameters:

nData1: Boolean value that indicates the result of the recording session. Supported values are the following:

Value

Meaning

0

The recording session failed. Check the LastError property value in order to see the last error.

1

The recording session succeeded.

EV_REC_AUDIBLE_DATA

12

Occurs during a recording session, having the Sound Activation System enabled, whenever audible data are being recorded again.

 

Involved data parameters: none

EV_REC_SILENT_DATA

13

Occurs during a recording session, having the Sound Activation System enabled, whenever a silent portion is being encountered.

 

Involved data parameters: none

EV_REC_SIZE

14

Occurs, during a recording session, to notify the amount of recorded PCM bytes.

This event is useful when recording PCM data in memory or with the purpose of saving recorded data into a destination WAV file.

Note that, when recording and encoding directly into MP3, OGG Vorbis or WMA formats, the reported size doesn't match the effective amount of memory occupied by the recording system because, in this case, recorded data are encoded directly into the destination file and immediately discarded from memory.

 

Involved data parameters:

nDataHigh4: Number representing the higher 32 bits of the size in bytes of the current recording session

nDataLow4: Number representing the lower 32 bits of the size in bytes of the current recording session

EV_REC_PAUSED

15

Occurs whenever a recording session is paused through a call to the RecorderPause method.

 

Involved data parameters: none

EV_REC_RESUMED

16

Occurs whenever a paused recording session is resumed through a call to the RecorderResume method.

 

Involved data parameters: none

EV_REC_DURATION

17

Occurs, during a recording session, to notify the actual recording duration in milliseconds.

It's important to note that, in case the recording session should have been started in append, mix, overwrite or insert mode (through the SetRecordingMode method), this event would only report the duration of the current recording session and not the overall duration that would result after finalizing the recording session with the previous one. If you want to know the current position of the recording session, which would take count of a previous recording session, the EV_REC_POSITION event would be the way to go.

 

Involved data parameters:

nDataHigh4: Number representing the higher 32 bits of the duration of the current recording session expressed in milliseconds

nDataLow4: Number representing the lower 32 bits of the duration of the current recording session expressed in milliseconds

EV_REC_POSITION

18

Occurs, during a recording session, to notify the actual recording position in milliseconds.

In case the recording session should have been started in append, mix, overwrite or insert mode (through the SetRecordingMode method), the position reported by this event would keep count of the previous recording session as well; if you want to know the duration of the current recording session only, the EV_REC_DURATION event would be the way to go.

 

Involved data parameters:

nDataHigh4: Number representing the higher 32 bits of the position of the current recording session in milliseconds

nDataLow4: Number representing the lower 32 bits of the position of the current recording session in milliseconds

EV_REC_PERC

19

Occurs to notify the current recording percentage during a file/memory/clipboard/URL based recording session started through one of the following methods:

StartFromClipboard

StartFromFile

StartFromFileEncrypted

StartFromFileRaw

StartFromMemory

StartFromMemoryRaw

StartFromURL

 

Involved data parameters:

nData1: Number representing the current advancement percentage of the recording session

EV_REC_SPLIT_SIZE

20

Occurs, during a recording session with stereo splitting started through the StartSplitFromDirectSoundDevice method, to notify the amount of recorded bytes for the left and right channels.

 

Involved data parameters:

nDataHigh3: Number representing the higher 32 bits of the amount of bytes of PCM data recorded on the left channel

nDataLow3: Number representing the lower 32 bits of the amount of bytes of PCM data recorded on the left channel

nDataHigh4: Number representing the higher 32 bits of the amount of bytes of PCM data recorded on the right channel.

nDataLow4: Number representing the lower 32 bits of the amount of bytes of PCM data recorded on the right channel.

EV_REC_WAV_CHUNK_SAVED

21

Occurs during a recording session in WAV format when a chunk file is saved to disk: this event is only generated after enabling the splitting of the recording session in chunks through a previous call to the SplitWavRecordingEnable method.

 

Involved data parameters:

nData1: Number representing the progressive number of the saved chunk

EV_REC_FINALIZATION_STARTED

22

Occurs when the finalization of a recording session begins: during the finalization process a new recording session is appended, mixed or inserted into a previous one.

 

Involved data parameters: none

EV_REC_FINALIZATION_DONE

23

Occurs when the finalization of a recording session is completed: during the finalization process a new recording session is appended, mixed or inserted into a previous one.

 

Involved data parameters:

nData1: The result of the finalization process.

Value

Meaning

Negative value

An error occurred, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The operation was successful.

EV_REC_OUTPUT_FILE_SWITCH

24

Occurs, during a recording session, when the output file is switched through a call to the SwitchOutputFile or the SwitchOutputFileEx methods.

 

Involved data parameters:

nData1: Number representing the zero-based index of the file that has been switched to another one.

EV_REC_CONNECTION_STARTED

25

Occurs when the connection to an Internet URL is started through a call to the StartFromURL method.

 

Involved data parameters: none

EV_REC_CONNECTION_DONE

26

Occurs when the connection to an Internet URL, started through a call to the StartFromURL method, is completed.

 

Involved data parameters:

nData1: The result of the connection.

Value

Meaning

Negative value

An error occurred, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The operation was successful.

EV_CD_ERROR

27

Occurs, during a CD ripping session, as a consequence of a CD read error.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: Number representing the one-based index of the CD audio track that is being ripped.

nDataLow3: Number representing the position within the CD track, expressed in bytes, where the read error occurred.

nDataLow4: Number representing the position within the CD track, expressed in milliseconds, where the read error occurred.

EV_CD_SPEED_CHANGE

28

Occurs when the speed of the CD drive is automatically reduced after an error occurs during the reading of a CD track.

Automatic speed reduction, disabled by default, can be enabled through the CdDriveAutoSpeedSet method.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: Number representing the new speed of the CD drive expressed in Kbytes per second. You can divide the speed by 176.4 to get the real-time speed multiplier; if for example the returned values should be 7096, the operation to perform would be

7096 / 176.4 = "40x".

EV_REC_CDDB_SERVERS_AVAIL

29

Occurs when the list of CDDB servers, requested through a previous call to the CddbRequestServersList method, is available.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: The number of CDDB servers found. If this parameter value is 0, this means that an error occurred during the connection to the CDDB site.

EV_REC_CDDB_ALBUM_INFO_AVAIL

30

Occurs when the CDDB server returns the CD album information requested through a previous call to the CddbRequestAlbumInfo method or when the Amazon Web Service returns the CD album information requested through a previous call to the CdRequestAlbumInfo method.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: Boolean value that specifies if the CDDB information was retrieved successfully. Supported values are the following:

Value

Meaning

0

The request failed

1

The request succeeded and CDDB information is available.

In this case the control can perform the following further requests passing the value of the nData1 parameter:

Obtain the CD album info through the CddbGetAlbumInfo method.
Get the number of tracks through the GetCdNumTracks method.
Get each track title through the CddbGetTrackTitle method.

EV_REC_CD_COVER_URLS_AVAIL

31

Occurs when the Internet URLs of the CD cover's pictures have been obtained from the Amazon Web Service.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: The result of the CD cover retrieval attempt.

Value

Meaning

Negative value

An error occurred, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The operation was successful.

EV_REC_CD_COVER_SMALL_FILE_AVAIL

32

Occurs when the small version of the CD cover's picture file has been downloaded from the Amazon web site.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: The result of the CD cover retrieval attempt.

Value

Meaning

Negative value

The request failed, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The operation was successful.

EV_REC_CD_COVER_MEDIUM_FILE_AVAIL

33

Occurs when the medium version of the CD cover's picture file has been downloaded from the Amazon web site.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: The result of the CD cover retrieval attempt.

Value

Meaning

Negative value

The request failed, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The operation was successful.

EV_REC_CD_COVER_LARGE_FILE_AVAIL

34

Occurs when the large version of the CD cover's picture file has been downloaded from the Amazon web site.

 

Involved data parameters:

nData1: Number representing the zero-based index of the CD drive reporting the event

nData2: The result of the CD cover retrieval attempt.

Value

Meaning

Negative value

The request failed, check the LastError property value in order to see the error code meaning

enumErrorCodes.ERR_NOERROR (0)

The operation was successful.

EV_REC_WAVE_ANALYSIS_PERC

35

Occurs during the analysis of a sound's waveform in order to notify the container application about the analysis advancement. The analysis is started through a previous call to the WaveformAnalyzer.AnalyzeFullSound method.

 

Involved data parameters:

nData1: Number representing the percentage of advancement for the current sound analysis

EV_REC_SOUND_UPLOAD_PERC

36

Notifies the advancement status, expressed in percentage, of an uploading session to a FTP server started through a previous call to the RecordedSound.RequestUploadToFTP method.

 

Involved data parameters:

nData1: Number representing the current percentage of the uploading session to a FTP server

EV_REC_SPECTRAL_ANALYSIS_PERC

37

Occurs during the spectral analysis of a sound's waveform in order to notify the container application about the analysis advancement.

 

Involved data parameters:

nData1: Number representing the percentage of advancement for the current sound analysis

EV_REC_SOUND_EXPORT_PERC

38

Occurs during the sound exporting session in order to notify the container application about the export advancement.

 

Involved data parameters:

nData1: Number representing the percentage of advancement for the exporting session

EV_REC_AUDIO_EXTRACT_PERC

39

Occurs during the extraction of the audio track from a video clip in order to notify the container application about the extraction advancement.

 

Involved data parameters:

nData1: Number representing the percentage of advancement for the extraction session

EV_REC_DURATION_AFTER_SWITCH

40

Occurs, during a recording session, to notify the actual recording duration in milliseconds of a sound file after switching the output file through the SwitchOutputFile or SwitchOutputFileEx methods.

 

Involved data parameters:

nDataHigh4: Number representing the higher 32 bits of the duration of the switched output  file expressed in milliseconds

nDataLow4: Number representing the lower 32 bits of the duration of the switched output  file expressed in milliseconds

nPlayerIndex

Zero-based index of the player reporting the event

nData1

First 32 bits integer value containing event specific data; its value and meaning depends upon the specific event received: see the table above for possible values.

nData2

Second 32 bits integer value containing event specific data; its value and meaning depends upon the specific event received: see the table above for possible values.

nDataHigh3

Higher 32 bits of the third argument of the event, if any; its value and meaning depends upon the specific event received: see the table above for possible values.

nDataLow3

Lower 32 bits of the third argument of the event, if any; its value and meaning depends upon the specific event received: see the table above for possible values.

nDataHigh4

Higher 32 bits of the fourth argument of the event, if any; its value and meaning depends upon the specific event received: see the table above for possible values.

nDataLow4

Lower 32 bits of the fourth argument of the event, if any; its value and meaning depends upon the specific event received: see the table above for possible values.