rtoss - Diff between revs 14 and 26

Subversion Repositories:
Rev:
Show entire file - Ignore whitespace
Rev 14 Rev 26
Line 17... Line 17...
17         m_cWritten = 0; 17         m_cWritten = 0;
18         m_dwWritten = 0; 18         m_dwWritten = 0;
19         m_pbBuf = NULL; 19         m_pbBuf = NULL;
20         m_nCurrent = 0; 20         m_nCurrent = 0;
21 21
22         m_dwBufLen = 500; -  
-   22         m_dwBufLen = 1000;
23         m_cBuf = 8; 23         m_cBuf = 8;
24         m_cbBuf = 16 * 1024; 24         m_cbBuf = 16 * 1024;
25 25
26         m_nLPeek = 0; 26         m_nLPeek = 0;
27         m_nRPeek = 0; 27         m_nRPeek = 0;
Line 38... Line 38...
38         m_dwThreadId = 0; 38         m_dwThreadId = 0;
39         m_pbSubBuf = NULL; 39         m_pbSubBuf = NULL;
40         m_nHdrOut = 0; 40         m_nHdrOut = 0;
41         m_nWriteCur = 0; 41         m_nWriteCur = 0;
42         memset(m_HdrOut, 0, sizeof(m_HdrOut)); 42         memset(m_HdrOut, 0, sizeof(m_HdrOut));
-   43         m_dwVolume = MAX_WAVEOUTVOLUME;
43 } 44 }
44 45
45 COutput::~COutput() 46 COutput::~COutput()
46 { 47 {
47 } 48 }
Line 99... Line 100...
99         m_pcm.wf.nSamplesPerSec = nSamplingRate; 100         m_pcm.wf.nSamplesPerSec = nSamplingRate;
100         m_pcm.wf.nAvgBytesPerSec = nBitsPerSample * nSamplingRate * nChannels / 8; 101         m_pcm.wf.nAvgBytesPerSec = nBitsPerSample * nSamplingRate * nChannels / 8;
101         m_pcm.wf.nBlockAlign = nBitsPerSample * nChannels / 8; 102         m_pcm.wf.nBlockAlign = nBitsPerSample * nChannels / 8;
102         m_pcm.wBitsPerSample = nBitsPerSample; 103         m_pcm.wBitsPerSample = nBitsPerSample;
103 104
104         // ƒfƒoƒCƒX‚ªƒI[ƒvƒ“‚Å‚«‚é‚܂ōĎŽs‚·‚é -  
105         for (i = 0; i < 10; i++) { 105         for (i = 0; i < 10; i++) {
106                 if (m_fDoubleBuf) 106                 if (m_fDoubleBuf)
107                         mmr = waveOutOpen(&m_hwo, WAVE_MAPPER, (LPWAVEFORMATEX)&m_pcm, (DWORD)WaveOutCallback2, 0, CALLBACK_FUNCTION); 107                         mmr = waveOutOpen(&m_hwo, WAVE_MAPPER, (LPWAVEFORMATEX)&m_pcm, (DWORD)WaveOutCallback2, 0, CALLBACK_FUNCTION);
108                 else 108                 else
109                         mmr = waveOutOpen(&m_hwo, WAVE_MAPPER, (LPWAVEFORMATEX)&m_pcm, (DWORD)WaveOutCallback, 0, CALLBACK_FUNCTION); 109                         mmr = waveOutOpen(&m_hwo, WAVE_MAPPER, (LPWAVEFORMATEX)&m_pcm, (DWORD)WaveOutCallback, 0, CALLBACK_FUNCTION);
Line 114... Line 114...
114                         goto fail; 114                         goto fail;
115                 Sleep(100); 115                 Sleep(100);
116         } 116         }
117         m_fPaused = FALSE; 117         m_fPaused = FALSE;
118         m_dwWritten = 0; 118         m_dwWritten = 0;
-   119
-   120         waveOutSetVolume(m_hwo, m_dwVolume);
119 121
120         if (!PrepareBuffer()) 122         if (!PrepareBuffer())
121                 goto fail; 123                 goto fail;
122 124
123         if (m_fDoubleBuf && !PrepareSubBuffer()) 125         if (m_fDoubleBuf && !PrepareSubBuffer())
Line 702... Line 704...
702 { 704 {
703         DWORD dwCurrent = GetCurrent(); 705         DWORD dwCurrent = GetCurrent();
704         return m_dwWritten - dwCurrent; 706         return m_dwWritten - dwCurrent;
705 } 707 }
706 708
-   709 DWORD COutput::GetVolume()
-   710 {
-   711         return m_dwVolume;
-   712 }
-   713
-   714 void COutput::SetVolume(DWORD dwVolume)
-   715 {
-   716         m_dwVolume = dwVolume;
-   717         if (m_hwo) {
-   718                 waveOutSetVolume(m_hwo, m_dwVolume);
-   719         }
-   720 }