Changeset View
Changeset View
Standalone View
Standalone View
intern/audaspace/intern/AUD_SoftwareDevice.cpp
| Show First 20 Lines • Show All 879 Lines • ▼ Show 20 Lines | boost::shared_ptr<AUD_IHandle> AUD_SoftwareDevice::play(boost::shared_ptr<AUD_IReader> reader, bool keep) | ||||
| if(!m_playback) | if(!m_playback) | ||||
| playing(m_playback = true); | playing(m_playback = true); | ||||
| return boost::shared_ptr<AUD_IHandle>(sound); | return boost::shared_ptr<AUD_IHandle>(sound); | ||||
| } | } | ||||
| boost::shared_ptr<AUD_IHandle> AUD_SoftwareDevice::play(boost::shared_ptr<AUD_IFactory> factory, bool keep) | boost::shared_ptr<AUD_IHandle> AUD_SoftwareDevice::play(boost::shared_ptr<AUD_IFactory> factory, bool keep) | ||||
| { | { | ||||
| try { | |||||
| return play(factory->createReader(), keep); | return play(factory->createReader(), keep); | ||||
| } | } | ||||
| catch (AUD_Exception&) { | |||||
| return boost::shared_ptr<AUD_IHandle>(); | |||||
| } | |||||
| } | |||||
| void AUD_SoftwareDevice::stopAll() | void AUD_SoftwareDevice::stopAll() | ||||
| { | { | ||||
| AUD_MutexLock lock(*this); | AUD_MutexLock lock(*this); | ||||
| while(!m_playingSounds.empty()) | while(!m_playingSounds.empty()) | ||||
| m_playingSounds.front()->stop(); | m_playingSounds.front()->stop(); | ||||
| ▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines | |||||