Mercurial > foo_out_sdl
comparison foosdk/sdk/foobar2000/SDK/audio_postprocessor.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 #include "audio_chunk.h" | |
| 4 #include "mem_block_container.h" | |
| 5 | |
| 6 //! This class handles conversion of audio data (audio_chunk) to various linear PCM types, with optional dithering. | |
| 7 class NOVTABLE audio_postprocessor : public service_base | |
| 8 { | |
| 9 public: | |
| 10 //! Processes one chunk of audio data. | |
| 11 //! @param p_chunk Chunk of audio data to process. | |
| 12 //! @param p_output Receives output linear signed PCM data. | |
| 13 //! @param p_out_bps Desired bit depth of output. | |
| 14 //! @param p_out_bps_physical Desired physical word width of output. Must be either 8, 16, 24 or 32, greater or equal to p_out_bps. This is typically set to same value as p_out_bps. | |
| 15 //! @param p_dither Indicates whether dithering should be used. Note that dithering is CPU-heavy. | |
| 16 //! @param p_prescale Value to scale all audio samples by when converting. Set to 1.0 to do nothing. | |
| 17 | |
| 18 virtual void run(const audio_chunk & p_chunk, | |
| 19 mem_block_container & p_output, | |
| 20 t_uint32 p_out_bps, | |
| 21 t_uint32 p_out_bps_physical, | |
| 22 bool p_dither, | |
| 23 audio_sample p_prescale | |
| 24 ) = 0; | |
| 25 | |
| 26 | |
| 27 | |
| 28 FB2K_MAKE_SERVICE_COREAPI(audio_postprocessor); | |
| 29 }; |
