Greetings VideoLAN community,
being a fan of VLC player for years now, I decided to use libVLC for developing multimedia applications. Note that I am only interested on sound playback for now. Compared to other APIs, I found libVLC to be much easier to use. I am also developing Fortran 2003/2008 bindings for libVLC, which work pretty well.
However, I have a problem concerning sound replay; specifically, I can initialize a libvlc_media_player_t struct, with libvlc_media_player_new_from_media(), which is played as expected with libvlc_media_player_play(). Once the sound is "ended" (as verified with libvlc_media_player_get_state()), I cannot replay the sound. Any further call of libvlc_media_player_play() produces no sound at all. The only way I found to replay a sound once it is ended is to call libvlc_media_player_stop() first, then call libvlc_media_player_play(), in which case the sound is replayed. I am probably missing something important here, as I don't see why I should stop a sound that is already ended in order to replay it.
The problem is irrelevant to said Fortran bindings, as it appears in C/C++ programs as well. It is also irrelevant to the operating system, as it appears in both Debian Linux 64-bit, and Windows 7 (32-bit) applications. I am using libVLC 2.1.2 (Rincewind).