when i do
AudioFormatManager::getInstance()->registerFormat (new MADAudioFormat (), true);
AudioFormatManager::getInstance()->registerFormat (new MPCAudioFormat (), false);
AudioFormatManager::getInstance()->registerBasicFormats();
DirectoryIterator di (File(T("d:\\mp3:)), true, AudioFormatManager::getInstance()->getWildcardForAllFormats());
and try to call di.next() i get no results (literally 0 files, i have mp3/ogg/mpc files in there for testing)
but when i change the wildcard filter to:
DirectoryIterator di (File(T("d:\\mp3:)), true, T("*"));
i get results.
Is the AudioFormatManager wildcard format incompatible with the DirectoryIterator ? When i look at the wildcard returned by the AudioFormatManager it looks OK
AudioPlayerMediaWatcher::run looking for files *.mp3;*.mp2;*.mpg;*.mpc;*.wav;*.bwf;*.aiff;*.aif;*.flac;*.ogg
Another problem:
also if i use the AudioFormatManager() as a singleton like so
AudioFormatReader *r = AudioFormatManager::getInstance()->createReaderFor (f);
i always get a memory leak
Detected memory leaks!
Dumping objects ->
c:\devel\juce\src\juce_appframework\audio\audio_file_formats\juce_audioformatmanager.h(142) : {60429} normal block at 0x03838958, 24 bytes long.
Data: < > 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
Object dump complete.
it doesn’t matter if i register any format or if i don’t it’s always there (it’s Win32 VISTA VC2008)