1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

AudioServer+LibAudio: Pass audio buffers as Core::AnonymousBuffer

This was the last remaining user of shbufs! :^)
This commit is contained in:
Andreas Kling 2021-01-17 08:43:58 +01:00
parent cc8b3c92ba
commit 2cd16778b5
9 changed files with 36 additions and 34 deletions

View file

@ -24,10 +24,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <AK/Atomic.h>
#include <LibAudio/Buffer.h>
namespace Audio {
i32 Buffer::allocate_id()
{
static Atomic<i32> next_id;
return next_id++;
}
template<typename SampleReader>
static void read_samples_from_stream(InputMemoryStream& stream, SampleReader read_sample, Vector<Sample>& samples, ResampleHelper& resampler, int num_channels)
{