Cinder newbie here. Trying to figure out why my BufferPlayerNode isn’t working properly. Everything compiles and the GainNodeRef has the correct volume (1.0f) but I cannot hear any sounds playing from my computer
Here’s the code snippet:
auto ctx = audio::Context::master(); audio::SourceFileRef source_file = audio::load(loadAsset("tanpura_C.mp3"), ctx->getSampleRate()); //create BufferPlayerNode from file buffer_player = ctx->makeNode(new audio::BufferPlayerNode()); buffer_player->loadBuffer(source_file); //create GainNode for volume control, set to max volume audio::GainNodeRef gain = ctx->makeNode(new audio::GainNode(1.0f)); // Connect player components to audio graph buffer_player >> gain >> ctx->getOutput(); std::cout << gain->getValue(); ctx->enable(); buffer_player->start();
Could anyone provide me with pointers about where I could be going wrong here? Thank you so much!!
I’m using Clion 2021.1.1 on MacOS Catalina if that helps.