Support locking audio via audio::engine
This commit is contained in:
parent
0fa0cbbc09
commit
df2003cbf6
2 changed files with 13 additions and 0 deletions
|
|
@ -39,6 +39,9 @@ namespace psemek::audio
|
|||
|
||||
std::shared_ptr<stream> play(std::shared_ptr<track> s, bool start = true, bool loop = false);
|
||||
|
||||
void lock();
|
||||
void unlock();
|
||||
|
||||
private:
|
||||
psemek_declare_shared_pimpl
|
||||
};
|
||||
|
|
|
|||
|
|
@ -347,4 +347,14 @@ namespace psemek::audio
|
|||
return str;
|
||||
}
|
||||
|
||||
void engine::lock()
|
||||
{
|
||||
SDL_LockAudio();
|
||||
}
|
||||
|
||||
void engine::unlock()
|
||||
{
|
||||
SDL_UnlockAudio();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue