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,52 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#include "audio/audio_io.h"
#include "filesystem/filesystem.h"
#include "platform.h"
#include "log/log.h"
using namespace GS;
template<> AudioIO *Singleton <AudioIO> ::i = NULL;
//------------------------------------------------------------------------------
void AudioIO::RegisterStreamFactory(IAudioStreamFactory *f)
{ stream_factories.Add(f); }
void AudioIO::RegisterSampleFactory(ISampleFactory *f)
{ sample_factories.Add(f); }
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
ISample *AudioIO::LoadSample(const char *path, const char *format)
{
String fmt(format);
if (Platform::Get().io->Exists(path))
ListForeachPtr(ISampleFactory *, codec, sample_factories)
if (ISample *sample = codec->Load(path))
{
if (!fmt || (fmt == sample->GetFormat()))
return sample;
_safe_delete(sample);
}
return NULL;
}
IAudioStream *AudioIO::OpenStream(const char *path, const char *format)
{
String fmt(format);
if (Platform::Get().io->Exists(path))
ListForeachPtr(IAudioStreamFactory *, codec, stream_factories)
if (IAudioStream *stream = codec->Open(path))
{
if (!fmt || (fmt == stream->GetFormat()))
return stream;
_safe_delete(stream);
}
return NULL;
}
//------------------------------------------------------------------------------