void DataSourcePath::createBuffer() { // no-op - we already supplied the buffer in the constructor IStreamFileRef stream = loadFileStream( mFilePath ); if( ! stream ) throw StreamExc(); mBuffer = loadStreamBuffer( stream ); }
void Logger::setLogFile(const char *filename, bool plainText, bool showOnScreen) { m_pLogFile = loadFileStream(m_pLogFile, filename); isHTML = !plainText; printToScreen = showOnScreen; if (isHTML) fprintf(m_pLogFile, "<h1>Log file (%s)</h1><table><tr><td><b>Tag</b></td><td><b>Time</b></td><td><b>File</b></td><td><b>Function</b></td><td><b>Message</b></td></tr>", CurrentDateTime().c_str()); }
AudioPlayer * AudioSystem::loadFile( const char * filename, const int bufferSize ) { AudioRecordingStream * rec = loadFileStream(filename, bufferSize, false); if ( rec != NULL ) { const AudioFormat & format = rec->getFormat(); AudioOut * out = mServiceProvider->getAudioOutput( format, bufferSize ); if ( out != NULL ) { // TODO // return new AudioPlayer(rec, out); } else { delete rec; delete out; } } // TODO // error("Couldn't load the file " + filename); return NULL; }
IStreamRef DataSourcePath::createStream() { return loadFileStream( mFilePath ); }