# PSA: Fix for sound issues on mGBA

**URL:** <https://forum.clockworkpi.com/t/psa-fix-for-sound-issues-on-mgba/3189>\
**Category:** Emulators\
**Tags:** retroarch, solved\
**Created:** [March 13, 2019, 12:22am UTC](https://forum.clockworkpi.com/t/psa-fix-for-sound-issues-on-mgba/3189 "2019-03-13T00:22:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruenzuo](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/ruenzuo/32/1577_2.png) [@Ruenzuo](https://forum.clockworkpi.com/u/Ruenzuo)\
**Post date:** [March 13, 2019, 12:22am UTC](https://forum.clockworkpi.com/t/psa-fix-for-sound-issues-on-mgba/3189/1 "2019-03-13T00:22:04Z")

</div>

mGBA has reports of sound issues and degraded performance since 0.7.0:

> <https://github.com/mgba-emu/mgba/issues/1313>

So I tried compiling the RetroArch core for 0.6.3 and surprise: it fixed the sound problems I had with Megaman Battle Network, so I’m quite happy with it.

This is how you can build the RetroArch core:

```bash
$ git clone https://github.com/mgba-emu/mgba.git mgba
$ git fetch
$ git checkout 0.6.3
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_LIBRETRO=ON ..
$ make

```

Then move it to your RetroArch `cores` directory:

```bash
$ cp mgba_libretro.so ~/.config/retroarch/cores/

```

As far as I can tell, the changes introduced in 0.7.0 were supposed to improve the accuracy on some Pokemon sounds so YMMV by downgrading to 0.6.3 depending on what games are you playing.

Edit: forgot to explain how to change tag

---

<div class="post-metadata">

**Author:** ![cjv123](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@cjv123](https://forum.clockworkpi.com/u/cjv123)\
**Post date:** [March 13, 2019, 7:53am UTC](https://forum.clockworkpi.com/t/psa-fix-for-sound-issues-on-mgba/3189/2 "2019-03-13T07:53:57Z")

</div>

good job…

---

<div class="post-metadata">

**Author:** ![skysurveil](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@skysurveil](https://forum.clockworkpi.com/u/skysurveil)\
**Post date:** [March 25, 2019, 4:16pm UTC](https://forum.clockworkpi.com/t/psa-fix-for-sound-issues-on-mgba/3189/3 "2019-03-25T16:16:23Z")

</div>

this did not work for me, when I run make, I do not get any resulting .so file, the only thing that is close is the correct named file but it has a weird longer extension and changing that to a .so and running it on the gameshell does not do anything

edit: I’m not aware of any other way to get the 0.6.3 version of the mgba .so - any help with this method is appreciated

---

<div class="post-metadata">

**Author:** ![lasvegas](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/lasvegas/32/769_2.png) [@lasvegas](https://forum.clockworkpi.com/u/lasvegas)\
**Post date:** [March 25, 2019, 6:01pm UTC](https://forum.clockworkpi.com/t/psa-fix-for-sound-issues-on-mgba/3189/4 "2019-03-25T18:01:06Z")

</div>

To simply things, the following can be copied & pasted to your SSH connection:

```auto
cd
git clone https://github.com/mgba-emu/mgba.git mgba
cd mgba
git fetch
git checkout 0.6.3
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_LIBRETRO=ON ..
make
```

Now the final line is a bit dated… If you’ve updated to clockworkos\_2.1 or later, enter the following to install the emulator:

```auto
cp mgba_libretro.so ~/apps/emulators/
```

---

<div class="post-metadata">

**Author:** ![skysurveil](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@skysurveil](https://forum.clockworkpi.com/u/skysurveil)\
**Post date:** [March 25, 2019, 7:38pm UTC](https://forum.clockworkpi.com/t/psa-fix-for-sound-issues-on-mgba/3189/5 "2019-03-25T19:38:14Z")

</div>

the problem when I try to run this on my gameshell is I get this when calling cmake:  
“-bash: cmake: command not found”  
And when I installed CMake on my pc and went through the commands, I didn’t get a resulting .so file.  
Am I supposed to be able to use the cmake command on the gameshell by default?  
I’m running the 0.21 version of the OS.

---

<div class="post-metadata">

**Author:** ![r043v](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/r043v/32/672_2.png) [@r043v](https://forum.clockworkpi.com/u/r043v)\
**Post date:** [March 25, 2019, 8:18pm UTC](https://forum.clockworkpi.com/t/psa-fix-for-sound-issues-on-mgba/3189/6 "2019-03-25T20:18:04Z")

</div>

run \>  
`sudo apt-get install cmake`

---

<div class="post-metadata">

**Author:** ![skysurveil](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@skysurveil](https://forum.clockworkpi.com/u/skysurveil)\
**Post date:** [March 25, 2019, 10:02pm UTC](https://forum.clockworkpi.com/t/psa-fix-for-sound-issues-on-mgba/3189/7 "2019-03-25T22:02:43Z")

</div>

got it working, thank you!

---

<div class="post-metadata">

**Author:** ![bennypowers](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/bennypowers/32/9070_2.png) [@bennypowers](https://forum.clockworkpi.com/u/bennypowers)\
**Post date:** [February 21, 2024, 4:16pm UTC](https://forum.clockworkpi.com/t/psa-fix-for-sound-issues-on-mgba/3189/8 "2024-02-21T16:16:33Z")

</div>

> [@lasvegas](#):
>
> `cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DBUILD_LIBRETRO=ON ..`

I wasn’t able to build 0.6.3

```auto
[80%] Building CXX object qt/CMakeFiles/mgba-qt.dir/main.cpp.o
In file included from /home/cpi/mgba/src/platform/qt/main.cpp:12:0:
/home/cpi/mgba/src/platform/qt/Window.h: In member function ‘void QGBA::Window::updateMultiplayerStatus(bool)’:
/home/cpi/mgba/src/platform/qt/Window.h:52:67: error: invalid use of incomplete type ‘class QAction’
  void updateMultiplayerStatus(bool canOpenAnother) { m_multiWindow->setEnabled(canOpenAnother); }
                                                                   ^~
In file included from /home/cpi/mgba/src/platform/qt/main.cpp:10:0:
/home/cpi/mgba/src/platform/qt/ConfigController.h:22:7: note: forward declaration of ‘class QAction’
 class QAction;
       ^ ~~~~~~
qt/CMakeFiles/mgba-qt.dir/build.make:153: recipe for target 'qt/CMakeFiles/mgba-qt.dir/main.cpp.o' failed
make[2]: *** [qt/CMakeFiles/mgba-qt.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:253: recipe for target 'qt/CMakeFiles/mgba-qt.dir/all' failed
make[1]: *** [qt/CMakeFiles/mgba-qt.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

```
