MCPcopy Create free account
hub / github.com/SpartanJ/eepp / createReaderFromStream

Method createReaderFromStream

src/eepp/audio/soundfilefactory.cpp:116–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116SoundFileReader* SoundFileFactory::createReaderFromStream( IOStream& stream ) {
117 // Register the built-in readers/writers on first call
118 ensureDefaultReadersWritersRegistered();
119
120 // Test the stream for all the registered factories
121 for ( ReaderFactoryArray::const_iterator it = s_readers.begin(); it != s_readers.end(); ++it ) {
122 stream.seek( 0 );
123 if ( it->check( stream ) )
124 return it->create();
125 }
126
127 // No suitable reader found
128 Log::error( "Failed to open sound file from stream (format not supported)" );
129 return NULL;
130}
131
132SoundFileWriter* SoundFileFactory::createWriterFromFilename( const std::string& filename ) {
133 // Register the built-in readers/writers on first call

Callers

nothing calls this directly

Calls 7

errorFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
seekMethod · 0.45
checkMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected