[Gambas-user] gb.media - audio recording file is emptied when ending the program
Benoît Minisini
benoit.minisini at gambas-basic.org
Thu Jan 18 01:56:39 CET 2024
Le 18/01/2024 à 00:45, vuott--- via User a écrit :
> ...I observed that (in a CLI-application) it is necessary to provide for
> both the ".Stop" Method and the ".Close" Method of the "MediaPipeline"
> Class, to avoid getting an empty audio file.
>
I guess that for 'filesink', 'Stop()' does not mean the job is finished,
as you may call 'Play()' again.
As by default 'filesink' uses a buffer, things are not immediately
written to the disk (you can disable that). So if you break the pipeline
before the normal end, you may get a void file.
Only 'Close()' will tell 'filesink' that the job is done, and so force
him to flush everything to the disk.
Regards,
--
Benoît Minisini.
More information about the User
mailing list