> Instead of DisconnectAudioOutputDevice() and Connect() like you stated above, > I would try this: > > try { > // instruct to load nothing > engineChannel->PrepareLoadInstrument("", 0); > // will unload the current instrument and then throw an > exception > engineChannel->LoadInstrument(); > } catch (...) { // catch all ... > // ... and ignore all ;-) > } >
Hehe, yeah, I tried that one too, in fact it was my first approach. Unfortunately the side-effects turned out a bit difficult to ignore ;-) : Loading gig file '/extra/kompoza/gig/Yamaha C7.gig'...OK Loading gig instrument ('/extra/kompoza/gig/Yamaha C7.gig',0)...OK Caching initial samples...OK [Thread 0xad153b70 (LWP 9909) exited] [New Thread 0xad153b70 (LWP 9982)] Freeing gig file from memory... Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xabd51b70 (LWP 9912)] 0x0021bc6e in LinuxSampler::EngineBase<LinuxSampler::gig::Voice, gig::Region, gig::DimensionRegion, LinuxSampler::gig::DiskThread, LinuxSampler::gig::InstrumentResourceManager, gig::Instrument>::RenderAudio(unsigned int) () from /usr/lib/linuxsampler/liblinuxsampler.so.3 (gdb) bt #0 0x0021bc6e in LinuxSampler::EngineBase<LinuxSampler::gig::Voice, gig::Region, gig::DimensionRegion, LinuxSampler::gig::DiskThread, LinuxSampler::gig::InstrumentResourceManager, gig::Instrument>::RenderAudio(unsigned int) () from /usr/lib/linuxsampler/liblinuxsampler.so.3 #1 0x002d0ae2 in LinuxSampler::AudioOutputDevice::RenderAudio(unsigned int) () from /usr/lib/linuxsampler/liblinuxsampler.so.3 #2 0x0081cb98 in __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::string const, LinuxSampler::DeviceCreationParameter*> > >::deallocate () from /usr/lib/dssi/ls16.so #3 0x0081e31a in __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::string const, LinuxSampler::DeviceCreationParameter*> > >::deallocate () from /usr/lib/dssi/ls16.so #4 0x0081e477 in __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::string const, LinuxSampler::DeviceCreationParameter*> > >::deallocate () from /usr/lib/dssi/ls16.so #5 0x0804bfae in lo_server_thread_get_url () #6 0x41ce587d in Jack::JackClient::Execute() () from /usr/lib/libjack.so.0 #7 0x41cfbab5 in Jack::JackPosixThread::ThreadHandler(void*) () from /usr/lib/libjack.so.0 #8 0x4e5de8f5 in start_thread (arg=0xabd51b70) at pthread_create.c:297 #9 0x4e513fce in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130 I guess it is no cookie, for now, unless I implement some workaround to skip the rendering call until the file is unloaded. L ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Linuxsampler-devel mailing list Linuxsampler-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel