sinple_example_output - RoseLeBlood/openess GitHub Wiki

OpenESS simple example

simple create output

#include "ess.h"
#include "ess_platform.h"
#include "ess_output_module.h"
#include "ess_input_module.h"

 void app_main() {
  // create the platform system
   ess_platform::Instance().create();

   // Create the platform i2s output module with ess_i2s_controller controller
   ess_output_module* i2s_output = ess_platform::Instance().create_output(ESS_OUTPUT_GENERIC_I2S,
     std::string("ess_i2s_controller") );

   std::cout << i2s_output->to_string() << std::endl;


   for(;;) { i2s_output->update();  }
}

/* Output:

[MEM] Init on 1073494632 with 16
I (5153) I2S: DMA Malloc info, datalen=blocksize=512, dma_buf_count=3
I (5153) I2S: DMA Malloc info, datalen=blocksize=512, dma_buf_count=3
I (5153) I2S: APLL: Req RATE: 48000, real rate: 47999.961, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 12287990.000, SCLK: 1535998.750000, diva: 1, divb: 0
I (5173) I2S: APLL: Req RATE: 48000, real rate: 47999.961, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 12287990.000, SCLK: 1535998.750000, diva: 1, divb: 0
i2s0:0 inputs:
-------------------------
        input: i2s0:0_left(0)
        input: i2s0:0_right(1)
-------------------------

*/
⚠️ **GitHub.com Fallback** ⚠️