first commit
This commit is contained in:
47
include/framework/audio/audio_io.h
Normal file
47
include/framework/audio/audio_io.h
Normal file
@ -0,0 +1,47 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#ifndef __AUDIOIO__
|
||||
#define __AUDIOIO__
|
||||
|
||||
|
||||
#include "audio/stream_interface.h"
|
||||
#include "audio/stream_factory.h"
|
||||
#include "audio/sample_interface.h"
|
||||
#include "audio/sample_factory.h"
|
||||
#include "memory/singleton.h"
|
||||
#include "container/nlist.h"
|
||||
|
||||
|
||||
namespace GS {
|
||||
|
||||
/*
|
||||
@short Audio factory.
|
||||
@author Emmanuel Julien (ejulien@owloh.com)
|
||||
*/
|
||||
class AudioIO : public Singleton <AudioIO>
|
||||
{
|
||||
AutoList <IAudioStreamFactory *> stream_factories;
|
||||
AutoList <ISampleFactory *> sample_factories;
|
||||
|
||||
public:
|
||||
|
||||
/// Register a stream codec.
|
||||
void RegisterStreamFactory(IAudioStreamFactory *);
|
||||
/// Register a sample codec.
|
||||
void RegisterSampleFactory(ISampleFactory *);
|
||||
|
||||
/// Open stream.
|
||||
IAudioStream *OpenStream(const char *path, const char *format = 0);
|
||||
/// Load a sample.
|
||||
ISample *LoadSample(const char *path, const char *format = 0);
|
||||
};
|
||||
|
||||
} // GS
|
||||
|
||||
|
||||
#endif // __AUDIOIO__
|
||||
|
||||
Reference in New Issue
Block a user