Mercurial > foo_out_sdl
comparison foosdk/sdk/foobar2000/SDK/audioEncoder.h @ 1:20d02a178406 default tip
*: check in everything else
yay
| author | Paper <paper@tflc.us> |
|---|---|
| date | Mon, 05 Jan 2026 02:15:46 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 0:e9bb126753e7 | 1:20d02a178406 |
|---|---|
| 1 #pragma once | |
| 2 | |
| 3 namespace fb2k { | |
| 4 //! \since 2.0 | |
| 5 struct audioEncoderSetup_t { | |
| 6 audio_chunk::spec_t spec; | |
| 7 uint32_t bps; | |
| 8 double durationHint; // Optional; if > 0 signals the encoder expected PCM stream length in advance to avoid rewriting headers | |
| 9 }; | |
| 10 //! \since 2.0 | |
| 11 class audioEncoderInstance : public service_base { | |
| 12 FB2K_MAKE_SERVICE_INTERFACE( audioEncoderInstance, service_base); | |
| 13 public: | |
| 14 virtual void addChunk( const audio_chunk & chunk, abort_callback & aborter ) = 0; | |
| 15 virtual void finalize( abort_callback & aborter ) = 0; | |
| 16 }; | |
| 17 | |
| 18 //! \since 2.0 | |
| 19 class audioEncoder : public service_base { | |
| 20 FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT( audioEncoder ); | |
| 21 public: | |
| 22 virtual const char * formatExtension() = 0; | |
| 23 virtual audioEncoderInstance::ptr open( file::ptr outFile, audioEncoderSetup_t const & spec, abort_callback & aborter ) = 0; | |
| 24 | |
| 25 static audioEncoderInstance::ptr g_open( const char * targetPath, file::ptr fileHint, audioEncoderSetup_t const & spec, abort_callback & aborter ); | |
| 26 }; | |
| 27 } |
