head 1.2; access; symbols pkgsrc-2017Q2:1.1.0.4 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.2 pkgsrc-2017Q1-base:1.1; locks; strict; comment @// @; 1.2 date 2017.08.19.10.27.24; author tsutsui; state dead; branches; next 1.1; commitid EjyNj7zgR9YKgO3A; 1.1 date 2017.02.24.17.33.32; author tsutsui; state Exp; branches; next ; commitid sE5pOgu71wHjheHz; desc @@ 1.2 log @Update PC6001VX to 2.31.0. Upstream changes: 2.31.0 2017/08/19 * make file dialog and setting dialog fullscreen for low resolution devices when the ALWAYSFULLSCREEN flag is specified on build * fix sound call method which was not thread safe * rewrite documents with asciidoc * (Windows) update build procedure make 64 bit version buildable recommend to use fixed MSYS2 version PATH setting no longer necessary * (UNIX) fix pro file to build on non-Linux UNIX systems * (non Windows) use absolute path for config files etc. * (Android) temporary workaround for access issue of file access on a SD card @ text @$NetBSD: patch-src_Qt_osdQt.cpp,v 1.1 2017/02/24 17:33:32 tsutsui Exp $ - pull upstream changes: - fix a missed comment for FDD access wait - make QAudioOutput calls thread safe --- src/Qt/osdQt.cpp.orig 2016-08-27 12:19:26.000000000 +0000 +++ src/Qt/osdQt.cpp @@@@ -46,8 +46,9 @@@@ QVector PaletteTable; #ifndef NOSOUND //サウンド関連 +#include "audiooutputwrapper.h" QPointer audioBuffer = NULL; -QPointer audioOutput = NULL; +QPointer audioOutput = NULL; #endif //ジョイスティック関連 @@@@ -256,6 +257,7 @@@@ const char *MsgIni[] = { QT_TRANSLATE_NOOP("PC6001VX", "オーバークロック率 (1-1000)%"), QT_TRANSLATE_NOOP("PC6001VX", "CRCチェック Yes:有効 No:無効"), QT_TRANSLATE_NOOP("PC6001VX", "ROMパッチ Yes:あてる No:あてない"), + QT_TRANSLATE_NOOP("PC6001VX", "FDDアクセスウェイト Yes:有効 No:無効"), // [DISPLAY] QT_TRANSLATE_NOOP("PC6001VX", "MODE4カラーモード 0:モノクロ 1:赤/青 2:青/赤 3:ピンク/緑 4:緑/ピンク"), QT_TRANSLATE_NOOP("PC6001VX", "スキャンライン Yes:あり No:なし"), @@@@ -1532,7 +1534,7 @@@@ bool OSD_OpenAudio( void *obj, CBF_SND c format = info.nearestFormat(format); } - audioOutput = new QAudioOutput(info, format); + audioOutput = new AudioOutputWrapper(info, format); //#PENDING これではグローバルボリュームを変えてしまう? //audioOutput->setVolume(0.5); @@@@ -1553,7 +1555,7 @@@@ void OSD_CloseAudio( void ) { #ifndef NOSOUND if(audioOutput){ - audioOutput->stop(); + QMetaObject::invokeMethod(audioOutput, "stop"); } #endif } @@@@ -1570,9 +1572,13 @@@@ void OSD_StartAudio( void ) #ifndef NOSOUND if(audioOutput){ if(audioOutput->state() == QAudio::SuspendedState){ - audioOutput->resume(); + QMetaObject::invokeMethod(audioOutput, "resume"); } else { - audioBuffer = audioOutput->start(); + //呼び元スレッドによってコネクションタイプを変える(戻り値を取得できるようにするために必要) + Qt::ConnectionType cType = QThread::currentThread() == qApp->thread() ? + Qt::DirectConnection : Qt::BlockingQueuedConnection; + QMetaObject::invokeMethod(audioOutput, "start", cType, + Q_RETURN_ARG(QPointer, audioBuffer)); } } #endif @@@@ -1589,7 +1595,7 @@@@ void OSD_StopAudio( void ) { #ifndef NOSOUND if(audioOutput){ - audioOutput->suspend(); + QMetaObject::invokeMethod(audioOutput, "suspend"); } #endif } @ 1.1 log @Pull upstream fixes. - fix a missed comment for FDD access wait in pc6001v.ini file - make QAudioOutput calls thread safe to suppress warning messages Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ @