Audio/ResourceManager updates

This commit is contained in:
James Turk 2005-07-06 02:10:06 +00:00
parent 564e8630cb
commit 733450664e
4 changed files with 14 additions and 9 deletions

View File

@ -30,6 +30,10 @@
<node ID="Freemind_Link_1045379727" TEXT="Sample">
<icon BUILTIN="button_ok"/>
</node>
<node ID="Freemind_Link_1851655735" TEXT="Music">
<icon BUILTIN="help"/>
<node COLOR="#fa6801" ID="Freemind_Link_1326895357" TEXT="Music likely bumped to 0.2 release"/>
</node>
</node>
<node ID="Freemind_Link_188779968" TEXT="Test Suite">
<node ID="Freemind_Link_1570884553" TEXT="port test-suite to Saturn core">
@ -68,7 +72,7 @@
<node ID="Freemind_Link_654490435" TEXT="Second Example Game">
<node ID="Freemind_Link_1191623789" TEXT="Public Project?"/>
</node>
<node ID="Freemind_Link_1851655735" TEXT="Music">
<node COLOR="#000000" ID="Freemind_Link_420721466" TEXT="XML/XSLT sink">
<icon BUILTIN="help"/>
</node>
</node>
@ -81,9 +85,8 @@
<node ID="Freemind_Link_682620075" POSITION="left" TEXT="Current Problems">
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
<node ID="Freemind_Link_1080393911" TEXT="audio:: could using some cleaning"/>
<node ID="Freemind_Link_1979809987" TEXT="Sample doesn&apos;t load via FileBuffer yet"/>
</node>
<node COLOR="#147f1e" ID="Freemind_Link_438641521" POSITION="left" TEXT="Version: $Id: photon.mm,v 1.12 2005/07/05 06:44:55 cozman Exp $">
<node COLOR="#147f1e" ID="Freemind_Link_438641521" POSITION="left" TEXT="Version: $Id: photon.mm,v 1.13 2005/07/06 02:10:06 cozman Exp $">
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
</node>
</node>

View File

@ -5,7 +5,7 @@
// James Turk (jpt2433@rit.edu)
//
// Version:
// $Id: SampleResourceManager.cpp,v 1.1 2005/07/05 06:44:56 cozman Exp $
// $Id: SampleResourceManager.cpp,v 1.2 2005/07/06 02:10:07 cozman Exp $
#include "audio/SampleResourceManager.hpp"
#include "audio/AudioCore.hpp"
@ -29,7 +29,7 @@ void SampleResourceManager::getAudioData(const std::string& name,
void SampleResourceManager::loadResourceData(SampleResource &res,
const ResourceDescriptor& desc)
{
//util::FileBuffer buf(path.path);
util::FileBuffer buf(desc.path);
// OpenAL variables to load into.
ALenum format;
ALsizei size;
@ -37,13 +37,14 @@ void SampleResourceManager::loadResourceData(SampleResource &res,
ALsizei freq;
ALboolean loop;
///std::vector<ubyte> data = buf.getData();
std::vector<ubyte> filedata = buf.getData();
size = filedata.size();
alGenBuffers(1, &res.bufferID); // create OpenAL buffer
AudioCore::throwOpenALError("alGenBuffers");
alutLoadWAVFile((ALbyte*)desc.path.c_str(), &format, &data, &size, &freq, &loop);
alutLoadWAVMemory((ALbyte*)&filedata[0], &format, &data, &size, &freq, &loop);
AudioCore::throwOpenALError("alutLoadWAVFile");

View File

@ -5,7 +5,7 @@
// James Turk (jpt2433@rit.edu)
//
// Version:
// $Id: AudioCore_test.cpp,v 1.3 2005/07/05 06:44:56 cozman Exp $
// $Id: Audio_test.cpp,v 1.1 2005/07/06 02:10:07 cozman Exp $
#include "photon.hpp"
using namespace photon;

View File

@ -5,9 +5,10 @@
// James Turk (jpt2433@rit.edu)
//
// Version:
// $Id: filesys_test.cpp,v 1.1 2005/05/15 02:50:07 cozman Exp $
// $Id: filesys_test.cpp,v 1.2 2005/07/06 02:10:07 cozman Exp $
#include "photon.hpp"
#include <iostream>
using namespace std;
using namespace photon;