#1111 ALSA plugin



I hacked a quick-n-dirty ALSA plugin for desmume, which is currently used in the GTK port. Also added some options to the GTK port, so that you can change the SPU mode.



  • Tobias Jakobi

    Tobias Jakobi - 2011-03-27

    I noticed that selecting the pcsx2 resampler currently crashes application. I'm already working on a proper fix.

  • Tobias Jakobi

    Tobias Jakobi - 2011-03-28

    I removed the three patches. You can find the revised patchset here:

    I couldn't get the internal soundtouch copy to compile under my system, so I went with the approach to use the system soundtouch instead, which works kinda well.
    The ALSA plugin only becomes available when ALSA is detected by the makefile. Same applies to the pcsx2 resampler. It's only available when a system soundtouch is detected.

    I made a quick test on my system (64-bit compile) with this changes (playing Radian Historia US version) and I get steady 60fps in the main menu. The main menu was previously the big issue with desmume, since fps collapses to something around 45 there.

  • Magliocchetti Riccardo

    If you can fold the build fixes in the relevant patches that adds the feature then it would be easier to test, anyway no big deal.
    Remember that using system libraries is always the sane thing to do so that is not a problem. Will take a look in the next days.

  • Magliocchetti Riccardo

    • assigned_to: nobody --> riccardom
  • Tobias Jakobi

    Tobias Jakobi - 2011-03-28

    OK, I folded the bugfixes into the respective patches. Updated the patchset, it's still living at the same URL as before. Also made the detection of soundtouch a bit better. The pkgconfig of the lib is a mess though. It seems to change on every update. *sigh*

    Please note that the patch no. 10 is unrelated for now. I only need it because libagg seems to make trouble on 64-bit, so I need to disable it. A bugreport for this is already filed.

  • Tobias Jakobi

    Tobias Jakobi - 2011-04-06

    Any news on this one?

  • Magliocchetti Riccardo

    Tobias, patches are still not folded / ordered correctly, i.e. you cannot separate the patch of the alsa plugin with the changes to build it. Anyway i've applied most of them except the alsa stuff. Any chance you can rediff them in one patch for backend and one for the gtk frontend changes on top of latest svn?
    As you can see i've made some changes here and there, especially in gtk frontend i've fixed the style a bit, i don't like at all to assert when we can have a sane default which don't break anything, for audio backend it really should be sdl.

  • Magliocchetti Riccardo

    About patch 2, any change you can isolate the bugfix from the rest? Also a backtrace and a reproducer would be nice.

  • Magliocchetti Riccardo

    About the alsa driver you really should fix the licence, header, and if the code is based on someone else code you should ship its copyright too.

  • Tobias Jakobi

    Tobias Jakobi - 2011-04-09

    1) Concerning the patch order: I can't follow you. That's what git format-patch -k outputs for me. And no, don't ask me to use plain svn instead -- it's a real pain in the ass to work with svn if you have git :)

    2) What do you mean by "patch 2"? I have no idea what kind of backtrace you want from me?!

    3) Concerning the ALSA output driver: You can probably drop the "based on" and replace it by "inspired from". It's standard ALSA setup code and not really specific to snes9x-gtk. If you really care that much, I can ask BearOso for permission.

  • Magliocchetti Riccardo

    1) It's not about git vs svn, it's like that the alsa patch can be combined with the autotools patch so that i can build it in one pass and don't have to mix with the soundtouch stuff, then the soundpatch detection should be done in one pass and not modified by a later patch. Yeah, this kind of workflow requires to start a new branch and touch all the patches again, but you are lucky and you only have to respin the alsa stuff :)

    2) the second patch has something like "protect against null pointer" in its name which suggests you get a segfault somewhere. So have you seen a crash related to this or is this just theoretically possible?

    3) I prefer you to do the changes i asked, also s/Yabause/Desmume in gpl header (same error on sndsdl.cpp). The please fix the coding style, K&R would be nice but desmume coding still vary a lot from file to file. Anyway please don't use two spaces for indenting, i'd say go for tabs.

  • Jan Bücken

    Jan Bücken - 2011-04-18

    since I know the patches from Tobias git repo:
    Do we need

    // Check if we actually need to change the mode
    242 if (synchmode == (ESynchMode)mode) {
    243 if (synchmode == ESynchMode_DualSynchAsynch)
    244 return;
    245 if (synchmode == ESynchMode_Synchronous && (ESynchMethod)method == synchmethod)
    246 return;
    247 }

    It seems that SPU_SetSynchMode is used to initialize the SPU.
    After starting with this lines you get no sound until you change the SPU. (Testet with gtk and wx port)
    You can reproduce this with running desmume, if you disable the sound and switch to DualASync.
    Then reenable the sound and you hear: Nothing.

    To reorder the patches:
    We spoke about
    git rebase -i HEAD~$X
    and this method seems very good, you can simply reorder the lines (but I believe you know it). You may have to force submitting the new history then.

  • zeromus

    zeromus - 2011-06-08

    adding a note here because the relevant change referenced this ticket.

    user heftig says that he can't find Agg_init() at link time when he uses --enable-hud. He fixed it by changing some FOUND_LIBAGG to HAVE_LIBAGG in configure.ac and we wonder why that check can't work the same as openAL (meshing user choice with package availability) which works for him, and think there may be something wrong with the way the libagg checking was coded.

  • zeromus

    zeromus - 2011-06-08
    • milestone: 589221 --> Unspecific SVN
    • priority: 5 --> 7
  • zeromus

    zeromus - 2014-03-30

    is this still relevant?

  • zeromus

    zeromus - 2014-03-30
    • assigned_to: Magliocchetti Riccardo --> Alvin Wong
    • planned milestone: --> 0.9.11
    • Group: --> future
  • Alvin Wong

    Alvin Wong - 2014-03-31

    The patches are lost.

  • Alvin Wong

    Alvin Wong - 2014-03-31
    • status: open --> closed-invalid


Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks