Skip to content

Commit

Permalink
Added option 'play_sounds_in_background' to configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Aug 2, 2010
1 parent 1955ec9 commit 440deaa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions doc.h
Expand Up @@ -861,6 +861,11 @@ class CMUSHclientDoc : public CDocument

unsigned short m_iDefaultTimerSendTo; // default send-to location for timers

// version 4.56

unsigned short m_bPlaySoundsInBackground; // if true, PlaySound uses a global sound buffer


// end of stuff saved to disk **************************************************************

// stuff from pre version 11, read from disk but not saved
Expand Down
7 changes: 6 additions & 1 deletion scripting/methods.cpp
Expand Up @@ -12300,7 +12300,12 @@ int i;
// we need to create a DirectSoundBuffer
// Set up bd structure for a static secondary buffer.
bd.dwSize = sizeof( bd ) ;
bd.dwFlags = (DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFREQUENCY) | DSBCAPS_STATIC ;
bd.dwFlags = (DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLFREQUENCY) | DSBCAPS_STATIC;

// want to hear in background?
if (m_bPlaySoundsInBackground)
bd.dwFlags |= DSBCAPS_GLOBALFOCUS;

// Buffer size retrieved from the mmckinfo structure for the data
// portion of the wav
bd.dwBufferBytes = mmckinfoSubchunk.cksize ;
Expand Down
1 change: 1 addition & 0 deletions scriptingoptions.cpp
Expand Up @@ -151,6 +151,7 @@ tConfigurationNumericOption OptionsTable [] = {
{"paste_delay", 0, O(m_nPasteDelay), 0, 100000},
{"paste_delay_per_lines", 1, O(m_nPasteDelayPerLines), 1, 100000},
{"paste_echo", false, O(m_bPasteEcho)},
{"play_sounds_in_background", false, O(m_bPlaySoundsInBackground)},
{"pixel_offset", 1, O(m_iPixelOffset), 0, 20, OPT_UPDATE_VIEWS},
{"port", 4000, O(m_port), 1, USHRT_MAX, OPT_PLUGIN_CANNOT_WRITE},
{"proxy_port", 1080, O(m_iProxyServerPort), 0, USHRT_MAX, OPT_PLUGIN_CANNOT_WRITE},
Expand Down

0 comments on commit 440deaa

Please sign in to comment.