Author Topic: PLAYMUSIC not working in Wine environment  (Read 2719 times)

Offline SBlectric

  • Mc. Print
  • *
  • Posts: 49
  • Coding is neat I guess
    • View Profile
    • SBlectric Studios
I got the IDE (latest 14.371) running fine in Wine in Linux, and pressing F5 to launch the game works and the game runs perfectly, except that PLAYMUSIC throws an error when it tries to play a file. This is just PLAYMUSIC's fault btw, as PLAYSOUND works fine. Instead of playing music, the window pauses and a pop-up window titled "No Device" appears. Is there any fix for this, or will I have to play my games without music from now on?

Also, it seems that the IDE's debug mode just crashes under Wine.
Cool stuff and whatever

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 109
    • View Profile
Re: PLAYMUSIC not working in Wine environment
« Reply #1 on: 2016-Sep-24 »
Tried PLAYMUSIC  on windows 10 x64 on version 14.101 and 14.371, both works Fine, Unable to test under wine Translation.
Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD FX 8350/1050Ti

Offline SBlectric

  • Mc. Print
  • *
  • Posts: 49
  • Coding is neat I guess
    • View Profile
    • SBlectric Studios
Re: PLAYMUSIC not working in Wine environment
« Reply #2 on: 2016-Sep-24 »
PLAYMUSIC works fine for me on Windows, just not on Wine.
Cool stuff and whatever

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4153
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: PLAYMUSIC not working in Wine environment
« Reply #3 on: 2016-Sep-24 »
PLAYMUSIC definitely works on WINE as I had a recent app that was tested on WINE until I did a Linux version. No issues.
I came. I saw. I played.

Offline SBlectric

  • Mc. Print
  • *
  • Posts: 49
  • Coding is neat I guess
    • View Profile
    • SBlectric Studios
Re: PLAYMUSIC not working in Wine environment
« Reply #4 on: 2016-Sep-24 »
For some reason it isn't working for me. Any tips?

Note: WAV files are sort of working, with the music playing successfully. Unfortunately, the "No Device" window still pops up and defocuses the game. Other encodings don't seem to work at all.
« Last Edit: 2016-Sep-24 by SBlectric »
Cool stuff and whatever

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3366
  • Integrated Brain
    • View Profile
Re: PLAYMUSIC not working in Wine environment
« Reply #5 on: 2016-Sep-25 »
Hi Sbelectric for me works fine, I test the sample "playmusic" and runs fine...
I'm using Linux Mint 18
wine-1.9.15 (Staging)
I set Wine like Win7.



Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4153
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: PLAYMUSIC not working in Wine environment
« Reply #6 on: 2016-Sep-25 »
Tips -

Ensure path is correct.
Ensure that file format and case is EXACTLY as written between the file and in the code eg "MyMusic.mp3" is NOT the same as "mymusic.mp3" Case sensitivity is a big thing on Android. BIG.

Other than that... If it's not working, it's likely to be either of those or both!

The other potential issue is the bitrate of your .MP3. I know that this was an issue with .WAVs a long time ago, but nt had any problems with .MP3.

Have you tried .OGG music?
I came. I saw. I played.

Offline SBlectric

  • Mc. Print
  • *
  • Posts: 49
  • Coding is neat I guess
    • View Profile
    • SBlectric Studios
Re: PLAYMUSIC not working in Wine environment
« Reply #7 on: 2016-Sep-25 »
It's not the path, since WAV files kind of work as described above. I've tried every type of music file and ALSA instead of PulseAudio backend, to no avail.
Cool stuff and whatever

MrTAToad

  • Guest
Re: PLAYMUSIC not working in Wine environment
« Reply #8 on: 2016-Sep-25 »
The "No Device" window is due to no valid driver being found.  I had thought it was only due to video playing, but maybe not.  So, for some reason there is no valid (or usable) MP3 music driver.

Offline SBlectric

  • Mc. Print
  • *
  • Posts: 49
  • Coding is neat I guess
    • View Profile
    • SBlectric Studios
Re: PLAYMUSIC not working in Wine environment
« Reply #9 on: 2016-Sep-25 »
That's weird, since PLAYSOUND plays sounds fine.
Cool stuff and whatever

MrTAToad

  • Guest
Re: PLAYMUSIC not working in Wine environment
« Reply #10 on: 2016-Sep-25 »
Yes, it can be odd - I've had cases where playing an MP3 with sounds is fine, but not through music playing.  Problem is finding the cause of the problem - it may not be using an MP3 audio playing system - instead it could be using a video playing system.  Or some driver may be corrupt or not initialising properly.  Or the MP3 may not be in a suitable format for the audio player.