| 1651 | } |
| 1652 | |
| 1653 | ExportResult FFmpegExportProcessor::Process(ExportProcessorDelegate& delegate) |
| 1654 | { |
| 1655 | delegate.SetStatusString(context.status); |
| 1656 | auto exportResult = ExportResult::Success; |
| 1657 | { |
| 1658 | while (exportResult == ExportResult::Success) { |
| 1659 | auto pcmNumSamples = context.mixer->Process(); |
| 1660 | if (pcmNumSamples == 0) |
| 1661 | break; |
| 1662 | |
| 1663 | short *pcmBuffer = (short *)context.mixer->GetBuffer(); |
| 1664 | |
| 1665 | if (!context.exporter->EncodeAudioFrame(pcmBuffer, pcmNumSamples)) |
| 1666 | // All errors should already have been reported. |
| 1667 | return ExportResult::Error; |
| 1668 | |
| 1669 | if(exportResult == ExportResult::Success) |
| 1670 | exportResult = ExportPluginHelpers::UpdateProgress( |
| 1671 | delegate, *context.mixer, context.t0, context.t1); |
| 1672 | } |
| 1673 | } |
| 1674 | |
| 1675 | if ( exportResult != ExportResult::Cancelled ) |
| 1676 | if ( !context.exporter->Finalize() ) // Finalize makes its own messages |
| 1677 | return ExportResult::Error; |
| 1678 | return exportResult; |
| 1679 | } |
| 1680 | |
| 1681 | |
| 1682 | void AddStringTagUTF8(char field[], int size, wxString value) |
nothing calls this directly
no test coverage detected