Lines Matching refs:pMixer

43 int audioMixerAddSink(PAUDIOMIXER pMixer, const char *pszName, AUDMIXSINKDIR enmDir, PAUDMIXSINK *ppSink)
45 AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
60 pSink->pParent = pMixer;
70 RTListAppend(&pMixer->lstSinks, &pSink->Node);
71 pMixer->cSinks++;
73 LogFlowFunc(("pMixer=%p, pSink=%p, cSinks=%RU8\n",
74 pMixer, pSink, pMixer->cSinks));
164 int audioMixerControlStream(PAUDIOMIXER pMixer, PAUDMIXSTREAM pHandle)
177 PAUDIOMIXER pMixer = (PAUDIOMIXER)RTMemAllocZ(sizeof(AUDIOMIXER));
178 if (pMixer)
180 pMixer->pszName = RTStrDup(pszName);
181 if (!pMixer->pszName)
186 pMixer->cSinks = 0;
187 RTListInit(&pMixer->lstSinks);
189 pMixer->VolMaster.fMuted = false;
190 pMixer->VolMaster.uLeft = UINT32_MAX;
191 pMixer->VolMaster.uRight = UINT32_MAX;
193 LogFlowFunc(("Created %p ...\n", pMixer));
195 *ppMixer = pMixer;
198 RTMemFree(pMixer);
207 void audioMixerDestroy(PAUDIOMIXER pMixer)
209 if (pMixer)
211 LogFlowFunc(("Destroying %s ...\n", pMixer->pszName));
213 PAUDMIXSINK pSink = RTListGetFirst(&pMixer->lstSinks, AUDMIXSINK, Node);
217 bool fLast = RTListNodeIsLast(&pMixer->lstSinks, &pSink->Node);
219 audioMixerRemoveSink(pMixer, pSink);
227 Assert(pMixer->cSinks == 0);
229 RTStrFree(pMixer->pszName);
231 RTMemFree(pMixer);
255 uint32_t audioMixerGetStreamCount(PAUDIOMIXER pMixer)
257 AssertPtrReturn(pMixer, 0);
262 RTListForEach(&pMixer->lstSinks, pSink, AUDMIXSINK, Node)
268 void audioMixerInvalidate(PAUDIOMIXER pMixer)
270 AssertPtrReturnVoid(pMixer);
272 LogFlowFunc(("%s: Invalidating ...\n", pMixer->pszName));
276 RTListForEach(&pMixer->lstSinks, pSink, AUDMIXSINK, Node)
278 int rc2 = audioMixerUpdateSinkVolume(pSink, &pMixer->VolMaster, &pSink->Volume);
351 void audioMixerRemoveSink(PAUDIOMIXER pMixer, PAUDMIXSINK pSink)
353 AssertPtrReturnVoid(pMixer);
374 Assert(pMixer->cSinks);
375 pMixer->cSinks--;
378 pMixer->pszName, pSink->pszName, pMixer->cSinks));
402 int audioMixerSetDeviceFormat(PAUDIOMIXER pMixer, PPDMAUDIOSTREAMCFG pCfg)
404 AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
408 pMixer->devFmt = *pCfg;
482 int audioMixerSetMasterVolume(PAUDIOMIXER pMixer, PPDMAUDIOVOLUME pVol)
484 AssertPtrReturn(pMixer, VERR_INVALID_POINTER);
487 pMixer->VolMaster = *pVol; //= audioMixerVolCalc(pVol);
490 pMixer->pszName, pVol->uLeft, pVol->uRight,
491 pMixer->VolMaster.fMuted, pMixer->VolMaster.uLeft, pMixer->VolMaster.uRight));
493 audioMixerInvalidate(pMixer);