To record to a 3GP file, use the Natural Access ADI service in combination with MMFI functions. Complete the following steps to record to a 3GP file:
Step |
Action |
Use |
1 |
Check the library version to ensure that it supports the 3GP format. |
|
2 |
Create the 3GP file. When you create this file, specify the format descriptor, file information, maximum file size, maximum duration, and interleaving depth. |
mmOpenFile in write mode |
3 |
For each type of media stream, create the media stream structure, and specify the following information:
|
|
4 |
Record the NMS packetized or raw audio data into memory-resident buffers. You can record multiple streams at the same time. |
|
5 |
Set the skew correction time if necessary. The skew correction time is handled automatically by the MMFI during the subsequent mmWriteStream operations. |
|
6 |
Store the buffers as the application receives them in ADIEVN_RECORDING_DONE events. If the application is using partial buffer mode (adiRecordMMAsync), repeat the mmWriteStream call for each received event. |
|
7 |
Close the 3GP file. |
The call flow for a single buffer record is shown below:
MMFI Lib |
App |
ADI service |
||||||||||||||||||||||||
|
||||||||||||||||||||||||||
The call flow for a partial buffer record is shown below:
MMFI Lib |
App |
ADI service |
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||