Replace deprecated std::atomic_load with std::atomic<shared_ptr> in audio::channel
This commit is contained in:
parent
cca966b33e
commit
d4e3cc623a
1 changed files with 3 additions and 3 deletions
|
|
@ -18,12 +18,12 @@ namespace psemek::audio
|
||||||
|
|
||||||
stream_ptr stream() const
|
stream_ptr stream() const
|
||||||
{
|
{
|
||||||
return std::atomic_load(&stream_);
|
return stream_.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
stream_ptr stream(stream_ptr new_stream)
|
stream_ptr stream(stream_ptr new_stream)
|
||||||
{
|
{
|
||||||
return std::atomic_exchange(&stream_, std::move(new_stream));
|
return stream_.exchange(std::move(new_stream));
|
||||||
}
|
}
|
||||||
|
|
||||||
stream_ptr stop()
|
stream_ptr stop()
|
||||||
|
|
@ -37,7 +37,7 @@ namespace psemek::audio
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
stream_ptr stream_;
|
std::atomic<stream_ptr> stream_;
|
||||||
};
|
};
|
||||||
|
|
||||||
using channel_ptr = std::shared_ptr<channel>;
|
using channel_ptr = std::shared_ptr<channel>;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue