AUD_Handle* AUD_play(AUD_Sound* sound, int keep) { assert(sound); try { AUD_Handle handle = AUD_device->play(*sound, keep); if(!handle.isNull()) return new AUD_Handle(handle); } catch(AUD_Exception&) { } return NULL; }
AUD_Handle* AUD_playDevice(AUD_Device* device, AUD_Sound* sound, float seek) { assert(device); assert(sound); try { AUD_Handle handle = (*device)->play(*sound); if(!handle.isNull()) { handle->seek(seek); return new AUD_Handle(handle); } } catch(AUD_Exception&) { } return NULL; }
AUD_Device* AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound* sequencer, float volume, float start) { try { AUD_ReadDevice* device = new AUD_ReadDevice(specs); device->setQuality(true); device->setVolume(volume); dynamic_cast<AUD_SequencerFactory*>(sequencer->get())->setSpecs(specs.specs); AUD_Handle handle = device->play(*sequencer); if(!handle.isNull()) handle->seek(start); return new AUD_Device(device); } catch(AUD_Exception&) { return NULL; } }