/// Get information on a music file (only artist and title at the moment). bool CAudioDecoderVorbis::getInfo(NLMISC::IStream *stream, std::string &artist, std::string &title) { CAudioDecoderVorbis mbv(stream, false); // just opens and closes the oggvorbisfile thing :) vorbis_comment *vc = ov_comment(&mbv._OggVorbisFile, -1); char *title_c = vorbis_comment_query(vc, "title", 0); if (title_c) title = title_c; else title.clear(); char *artist_c = vorbis_comment_query(vc, "artist", 0); if (artist_c) artist = artist_c; else artist.clear(); return true; }
typename MatrixBlockMonolithicEpetra<DataType>::block_ptrType MatrixBlockMonolithicEpetra<DataType>::block (const UInt& rowIndex, const UInt& columnIndex) { ASSERT (rowIndex < M_blockFirstRows.size(), "Row index out of bound. No block to return"); ASSERT (columnIndex < M_blockFirstColumns.size(), "Column index out of bound. No block to return"); block_ptrType mbv (new block_type); mbv->setup (M_blockFirstRows[rowIndex], M_blockFirstColumns[columnIndex], M_blockNumRows[rowIndex], M_blockNumColumns[columnIndex], this); return mbv; }