Log In  

Hi this is Tom, so first time poster please be gentle.
I recently purchased PICO-8 and started going through a cool tutorial on how to use it.
Then I got to a video about sound and tried playing sounds in the engine ( PICO-8 ).
I played them with the laptops sounds muted and the headphones not, and the issue
is that the sounds are played to the Laptop, not to my headphones ( like the video I
was just watching ). So more to the point is this a known issue / is there a workaround?
Loving the system an everything so far just have this one issue, and I don't know
how to solve it.

P#49401 2018-02-18 23:58 ( Edited 2018-02-20 02:23)

OK so I figured it out. >_<
Before you run PICO-8 have the headset plugged in and set to default and don't unplug it. Once you do it breaks the connection and PICO-8 defaults to the computer or laptop. So if anyone else has this problem that's the solution.

P#49411 2018-02-19 09:51 ( Edited 2018-02-19 14:51)

Yeah, the sound output has always been finicky for me too -- if I put my laptop to sleep and then resume, it doesn't have sound any more, and while it's running (even in that state) it blocks sound from other applications. :/ Kind of a bummer but not hard to work around once you know what's going on. (Except when I don't want to close it because I'll lose my place in a game, haha.)

P#49425 2018-02-19 15:28 ( Edited 2018-02-19 20:28)

What OS are you experiencing this on?

I've never had any audio issues in Linux (funnily enough :p)

P#49433 2018-02-19 18:07 ( Edited 2018-02-19 23:07)

Mac OSX bootcamp of Windows

P#49439 2018-02-19 21:23 ( Edited 2018-02-20 02:23)

I ran into this, it was driving me crazy. I even updated PICO (had to update anyway) and I still had no sound. Turns out I had just accidentally muted it some time and not realized, it must live in a very persistent config somewhere.

The hotkey on windows is ctrl+m, probably command+m on osx.

P#81684 2020-09-11 05:08
:: Felice
2

@leonwoud

Looks like PICO-8 literally just sets sound_volume to 0 in the config.txt file when you've used ctrl-m to mute it.

Interestingly, sound_volume seems to be an all-or-nothing setting:

  • If you manually edit it to be 0, volume is muted.

  • If you manually edit it to anything other than 0, it's treated like 256, and gets saved as 256 going forward.

The volume setting in config.txt is the actual sound volume control, given this comment in the file:

// :: Audio Settings (use "volume" for PICO-8)

sound_volume 256 // 0..256

(That comment should probably say "// 0 or 256".)

I'd guess @zep is just doing something like this pseudocode when reading config.txt:

if read_config("sound_volume") != 0 then
  mute_mul = 1
else
  mute_mul = 0
end

volume_mul = read_config("volume") / 256

Then this during per-tick sound processing:

final_vol = note_vol * volume_mul * mute_mul

And this when it saves:

write_config("sound_volume", mute_mul * 256)
write_config("volume", volume_mul * 256)

So the mute setting isn't a flag, it's actually just another volume control that can only be full or silent.

P#81839 2020-09-15 06:26 ( Edited 2020-09-15 06:32)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-09-20 14:39 | 0.031s | 4194k | Q:24