MCJack123 / craftos2

A fast, modern, and feature-filled ComputerCraft emulator written in C++.
https://www.craftos-pc.cc
Other
228 stars 26 forks source link

Issue with ModPlug_Load in Speaker function #363

Closed QM8782 closed 1 month ago

QM8782 commented 1 month ago

Describe the bug I have an issue. I am trying play a converted DFPWM file, aaaand it's erroring when I run it...

Could not load music file: ModPlug_Load failed

All my devices are working, why is not CraftOS-PC doing so as well? I even updated and it's still broken.

-- s is the variable I assigned it to
s.playLocalMusic("/sys/snd/startup.dfpwm")

Any clue how to fix it? Thanks, -QM-

To Reproduce Steps to reproduce the behavior:

  1. Go to Lua
  2. Wrap speaker
  3. Play direct file

Expected behavior To play the sound without failing...

Screenshots If applicable, add screenshots or recordings to help explain your problem. You can capture these using F2, F3, or F12. If CraftOS-PC has crashed, paste the stack trace here (wrapped in ``` characters please!).

Environment (please complete the following information):

Additional context Add any other context about the problem here.

MCJack123 commented 1 month ago

playLocalMusic isn't the correct function to use - it's a custom CCPC function made before the standard playAudio method, and doesn't support DFPWM. Use this guide to play audio in CC.