this->mwindow = mwindow;
this->indexable = indexable;
redraw_timer = new Timer;
-
if(indexable)
{
indexable->add_user();
// open the source file
if(open_source()) return 1;
+ source_channels = indexable->get_audio_channels();
+ source_samplerate = indexable->get_sample_rate();
+ source_length = indexable->get_audio_samples();
SET_TRACE
// Read the file format & index state.
if(test_indexable->is_asset)
{
- Asset *asset = (Asset*)test_indexable;
+ Asset *test_asset = (Asset *)test_indexable;
+ Asset *asset = new Asset;
asset->read(&xml);
-
+ int ret = 0;
//printf("IndexFile::read_info %d %f\n", __LINE__, asset->get_frame_rate());
- if(asset->format == FILE_UNKNOWN)
- {
+ if( asset->format == FILE_UNKNOWN ||
+ test_asset->format != asset->format ) {
if(debug) printf("IndexFile::read_info %d\n", __LINE__);
- return 1;
+ ret = 1;
}
+ asset->remove_user();
+ if( ret ) return ret;
}
else
{