[Gambas-user] gb.media - audio recording file is emptied when ending the program

vuott at tutanota.com vuott at tutanota.com
Wed Jan 17 16:06:20 CET 2024


Uhmmm... so, it seems to me that we also register some different behavior.





17 gen 2024, 15:55 da claus.dietrich at freenet.de:

> Am 17.01.24 um 13:09 schrieb vuott--- via User:
>
>> Well, with a CLI-program the created file is not empty, only if the "MediaPipeline" instance variable is "global" (as Claus had already pointed out). In that case, however, I found that in order to make the program terminate, it is necessary to impose the "Quit" function.
>>
>> Instead, if this variable is "local," an empty audio file is generated. I had known about this problem for a long time, and to solve it, I adopted the temporary support file stratagem. If the variable is "local," the program ends regularly.
>>
> I cannot confirm, that a local declarations of the MediaPipeline or any other MediaControl makes a difference (V3.18.4). I tested it with the given example and the result was exactly the same. I am assuming that a Quit command is equal to a click on the stop button of the IDE which also preserves the contents of the mp3 file. I informed Benoît about that in an email which I sent mistakenly to his personal account - my apologies.
>
> I just tried to run the given example as a non-GUI-application and can confirm that the mp3 file is not emptied when doing this:
>
> ...
>
>     pl.play
>     Wait 20
>     pl.Stop
>     pl.close
>
> This also worked with the GUI-application, but when I closed the FMain (without any further command) the mp3 file was empty again. Does FMain act as a media container which fills the mp3 file and kills its content when being closed?
>
> When the non-GUI application is brutally terminated by clicking on the stop button of the IDE or by imposing a Quit command the contents of the mp3 file is also preserved. But the same happens with the GUI version.
>
> Best regards
>
> Claus
>
>
>
>
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20240117/f8050562/attachment.htm>


More information about the User mailing list