commit x64 compilation from lulu cause the other branch dont seems to compile properly at home

This commit is contained in:
2026-07-17 16:08:20 +02:00
parent c0f3eeb00d
commit 0efa4ee6f7
625 changed files with 117283 additions and 4426 deletions

View File

@ -0,0 +1,44 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#include "audio/sample_wav.h"
#include "log/log.h"
using namespace GS;
//------------------------------------------------------------------------------
bool SampleWav::GetSampleFormat(SampleFormat &fmt) const
{
fmt = format;
return true;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
Time SampleWav::GetDuration() const
{ return Time::fromMs(sample_count * 1000 / format.frequency); }
uint SampleWav::GetPCMDataSize() const
{ return format.GetPCMDataSize(sample_count); }
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
char *SampleWav::AllocAs(uint count, const SampleFormat &fmt)
{
format = fmt;
if (!pcm_data.Allocate(format.GetPCMDataSize(count)))
__ERR__(__LOG_E__ << "Failed to allocate raw PCM sample buffer.\n", NULL)
sample_count = count;
return pcm_data;
}
void SampleWav::Set(Array <char> &pcm, uint count, const SampleFormat &fmt)
{
pcm_data = pcm;
sample_count = count;
format = fmt;
}
//------------------------------------------------------------------------------