Ticket #4412: 4412-dsound.patch

File 4412-dsound.patch, 4.1 KB (added by Jeff Lu <jll544@…>, 10 years ago)

Suggested approach: check for dsound.h in configure

  • configure

     
    13221322    audio_alsa
    13231323    audio_jack
    13241324    audio_oss
     1325    audio_dsound
    13251326    ffmpeg_pthreads
    13261327    mac_bundle
    13271328    proc_opt
     
    36593660    enable  audio_jack ||
    36603661    disable audio_jack
    36613662
     3663# DirectSound probe
     3664enabled windows &&
     3665    check_header dsound.h &&
     3666    enable audio_dsound ||
     3667    disable audio_dsound
     3668
    36623669enabled x11grab                         &&
    36633670check_header X11/Xlib.h                 &&
    36643671check_header X11/extensions/XShm.h      &&
     
    42084215  echo "JACK support              ${audio_jack-no}"
    42094216  if test x"$target_os" = x"mingw32" ; then
    42104217    echo "Windows (Windows audio)   yes"
    4211     echo "Windows (DirectX)         yes"
     4218    echo "Windows (DirectX)         ${audio_dsound-no}"
    42124219  fi
    42134220  echo "libfftw3 support          ${libfftw3-no}"
    42144221  echo
     
    43844391  echo "CONFIG_AUDIO_PULSE_LIBS=$audio_pulse_libs" >> $MYTH_CONFIG_MAK
    43854392fi
    43864393
     4394if enabled audio_dsound; then
     4395  append CCONFIG "using_dsound"
     4396fi
     4397
    43874398if enabled freetype2; then
    43884399    echo "HAVE_FREETYPE2=yes" >> $MYTH_CONFIG_MAK
    43894400    echo "FREETYPE_CFLAGS=`freetype-config --cflags`" >> $MYTH_CONFIG_MAK
  • libs/libmyth/libmyth.pro

     
    136136
    137137mingw {
    138138    DEFINES += USING_MINGW
    139     SOURCES += mediamonitor-windows.cpp audiooutputwin.cpp audiooutputdx.cpp
    140     HEADERS += mediamonitor-windows.h   audiooutputwin.h   audiooutputdx.h
     139    SOURCES += mediamonitor-windows.cpp audiooutputwin.cpp
     140    HEADERS += mediamonitor-windows.h   audiooutputwin.h
    141141    LIBS += -lpthread -lwinmm -lws2_32
    142142}
    143143
     144using_dsound {
     145    DEFINES += USING_DSOUND
     146    SOURCES += audiooutputdx.cpp
     147    HEADERS += audiooutputdx.h
     148}
     149
    144150macx {
    145151    HEADERS += audiooutputca.h
    146152    SOURCES += audiooutputca.cpp
  • libs/libmyth/audiooutput.cpp

     
    88#include "compat.h"
    99
    1010#include "audiooutputnull.h"
     11#ifdef USING_DSOUND
     12#include "audiooutputdx.h"
     13#endif
    1114#ifdef USING_MINGW
    12 #include "audiooutputdx.h"
    1315#include "audiooutputwin.h"
    1416#endif
    1517#ifdef USING_OSS
     
    7274    }
    7375    else if (main_device.startsWith("DirectX:"))
    7476    {
    75 #ifdef USING_MINGW
     77#ifdef USING_DSOUND
    7678        return new AudioOutputDX(settings);
    7779#else
    7880        VERBOSE(VB_IMPORTANT, "Audio output device is set to DirectX device "
  • programs/mythfrontend/mythfrontend.pro

     
    8282using_alsa:DEFINES += USING_ALSA
    8383using_jack:DEFINES += USING_JACK
    8484using_oss: DEFINES += USING_OSS
     85using_dsound:DEFINES += USING_DSOUND
    8586macx:      DEFINES += USING_COREAUDIO
  • programs/mythfrontend/globalsettings.cpp

     
    8080#endif
    8181#ifdef USING_MINGW
    8282    gc->addSelection("Windows:");
     83#endif
     84#ifdef USING_DSOUND
    8385    gc->addSelection("DirectX:Primary Sound Driver");
    8486#endif
    8587
     
    164166
    165167    gc->setLabel(QObject::tr("Digital output device"));
    166168    gc->addSelection(QObject::tr("Default"), "Default");
    167 #ifdef USING_MINGW
     169#ifdef USING_DSOUND
    168170    gc->addSelection("DirectX:Primary Sound Driver");
    169171#else
    170172    gc->addSelection("ALSA:iec958:{ AES0 0x02 }", "ALSA:iec958:{ AES0 0x02 }");
     
    211213#ifdef USING_ALSA
    212214    gc->addSelection("ALSA:default", "ALSA:default");
    213215#endif
     216#ifdef USING_DSOUND
     217    gc->addSelection("DirectX:", "DirectX:");
     218#endif
    214219#ifdef USING_MINGW
    215     gc->addSelection("DirectX:", "DirectX:");
    216220    gc->addSelection("Windows:", "Windows:");
    217221#endif
    218222#if !defined(USING_MINGW)