Music component - Editor Vs Compiled program.

Post your Gambas programming questions here.
Post Reply
User avatar
Quincunxian
Posts: 173
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Music component - Editor Vs Compiled program.

Post by Quincunxian »

I have a strange issue.
I have a number of programs that use the gb.sdl2.audio - Music component.
If I use it to play any applicable media in the Editor (on Run application) there is no error and the file does not play.
If I compile to executable and then run that, every works as expected.

I've tried this with different projects with the same problem.

Can someone else confirm that this may be an issue or is it (yet another) me and my computer issue.
Cheers - Quin.
I code therefore I am
Online
User avatar
cogier
Site Admin
Posts: 1127
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Music component - Editor Vs Compiled program.

Post by cogier »

I ran the following program in the Editor, and it works OK for me. Sorry, but it seems that it is "(yet another) me and my computer issue."

Public Sub Form_Open()
  
  Music.Load(Application.Path &/ "Sample.mp3")
  Music.Play
  
End
User avatar
Quincunxian
Posts: 173
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

Re: Music component - Editor Vs Compiled program.

Post by Quincunxian »

Thanks for checking.
I created a new project, copied in your code with a valid mp3 file and it has the same result - no sound.
I checked the status of Music.Playing and it returns true, so this suggests that the component is not in an error state.
I created an executable and the music played as expected. *sigh*

I'll add it to the list of bizarre things that Gambas does in my machine from time to time.
I may have to put on a grass skirt, grab some bone rattles and do a dance around my computer.
Cheers - Quin.
I code therefore I am
User avatar
thatbruce
Posts: 168
Joined: Saturday 4th September 2021 11:29pm

Re: Music component - Editor Vs Compiled program.

Post by thatbruce »

Quincunxian wrote: Monday 23rd October 2023 12:33am I may have to put on a grass skirt, grab some bone rattles and do a dance around my computer.
Post video, we may be able to detect incorrect dance steps! :D
Have you ever noticed that software is never advertised using the adjective "spreadable".
Post Reply