#include "randomaccessaudioreadable.h" #include EMSCRIPTEN_BINDINGS(randomaccessaudioreadable) { using namespace emscripten; class_("RandomAccessAudioReadable") .smart_ptr>( "RandomAccessAudioReadable") .property("sampleRate", &RandomAccessAudioReadable::getSampleRate) .property("channelCount", &RandomAccessAudioReadable::getChannelCount) .property("frameCount", &RandomAccessAudioReadable::getFrameCount) .function("read(offset, outputBuffer)", select_overload)>( &RandomAccessAudioReadable::read)); class_>("OffsetView") .smart_ptr_constructor, std::shared_ptr &&, int &&, int &&>("OffsetView", &std::make_shared); };