Hello,
I work with C++ on Ubuntu and I have a problem with the creation of a playlist. When I create a normal player with createPlayer("music1.wav", 0) everything works fine.
But when I try to create a playlist with:
pj::stringVetor playlist = {"music1.wav", "music2.wav"};
createPlaylist(playlist, "", 0);
I get an error which says that the WAVE file format is unsupported:
08:36:49.097 pjsua_aud.c !Creating playlist with 2 file(s)..
08:36:49.097 pjsua_aud.c .Unable to create playlist: Unsupported WAVE file
format (PJMEDIA_EWAVEUNSUPP) [status=220181]
08:36:49.097 media.cpp pjsua_playlist_create(pj_files, i, &pj_lbl,
options, &playerId) error: Unsupported WAVE file format (PJMEDIA_EWAVEUNSUPP)
(status=220181) [..src/pjsua2/media.cpp:313]
terminate called after throwing an instance of 'pj::Error'
I can't believe that the file format is not supported, because it works fine with the same wav-file when creating a normal player.
Someone actually had the same problem, which can be seen here: http://pjsip.pjsip.narkive.com/myZ32smj/bug-in-pjmedia-wav-playlist-create-function
He managed to overcome this problem by changing an != operand to an > operand in the wav_playlist.c file. I tried the same but it still doesn't work for me.
He actually reported this as a bug but the changes didn't affect the version 2.6 or the version 2.7. (I work with version 2.6)
The change can be seen here: https://github.com/halex2005/pjproject/commit/6cd30232e1ba6dff74651af2f41501dadb06ff77
Is this really a bug or lies the problem probably somewhere in my code?
Best Regards
Vukasin