At 10:01 AM 10/26/2006, Greg Wright wrote:
>Three of the .diff files attached are empty.
Sorry for the empty diffs; those platforms don't use
_OpenAudio() because
the _Imp_Open() virtual function was overwritten.
I attached at the bottom of this email a few diffs for
headers that I
forgot to include.
>+ UINT32 uPrefForceStereo = 0;
>+ if (m_pContext)
>+ {
>+ if(HXR_OK != ReadPrefUINT32(m_pContext,
>"DisableSurroundSoundPlayback",
uPrefForceStereo))
>+ {
>+ // Add
"DisableSurroundSoundPlayback" into the
Preference.
>+ WritePrefUINT32(m_pContext,
"DisableSurroundSoundPlayback", 0);
>+ }
>+ }
>
>Generally, if a pref is not present, we do not write one
out like
>you do above. We just leave it not present and use
default values.
In some cases, I really like it to be in the preference file
because it
makes it much easier to use, instead of Googling for the
right preference
key to use. In this case, the player provided the UI for it,
so I am fine
with removing it. I'll do so.
>I think that "DisableMultiChannelPlayback"
might be a clearer name.
This is great! I'll adopt the name.
>Also, the ReadPref*() utils check for null IUnknowns.
So, the above
>could just be:
>
>+ UINT32 uPrefForceStereo = 0;
>+ ReadPrefUINT32(m_pContext,
"DisableSurroundSoundPlayback",
>uPrefForceStereo);
>
>If you don't have a context or the pref doesn't exist,
then uPrefForceStereo
>will still be zero on exit.
Thanks. I'll do the change and start checking in.
--
Daniel Yek
>Same thing with:
>
>+ if(HXR_OK != ReadPrefUINT32(m_pContext,
>"AlsaVaryingSampleRate",
uPrefSampleRateNoDefault))
> {
>- // Add AlsaVaryingSampleRate into
Preference.
>- IHXBuffer* pBuffer = new CHXBuffer;
>- pBuffer->AddRef();
>- pBuffer->SetSize(2);
>- SafeSprintf((char*)
pBuffer->GetBuffer(),2,"%d", 0); /*
>Flawfinder: ignore */
>-
z_pIHXPrefs->WritePref("AlsaVaryingSampleRate",
pBuffer);
>- pBuffer->Release();
>+ // Add
"AlsaVaryingSampleRate" into the Preference.
>+ WritePrefUINT32(m_pContext,
"AlsaVaryingSampleRate", 0);
> }
>
>
>The rest looks good.
>
>--greg.
Index: audhpux.h
============================================================
=======
RCS file:
/cvsroot/audio/device/pub/platform/unix/audhpux.h,v
retrieving revision 1.4
diff -u -w -r1.4 audhpux.h
--- audhpux.h 23 Sep 2004 18:20:29 -0000 1.4
+++ audhpux.h 26 Oct 2006 18:40:17 -0000
 -97,7
+97,7 
virtual HX_RESULT _WriteBytes( UCHAR* buffer, ULONG32
ulBuffLength,
LONG32& lCount );
//Device specific methods to open/close the mixer and
audio devices.
- virtual HX_RESULT _OpenAudio();
+ virtual HX_RESULT _OpenAudio(const HXAudioFormat* /*
pFormat */);
virtual HX_RESULT _CloseAudio();
virtual HX_RESULT _OpenMixer();
virtual HX_RESULT _CloseMixer();
Index: audirix.h
============================================================
=======
RCS file:
/cvsroot/audio/device/pub/platform/unix/audirix.h,v
retrieving revision 1.2
diff -u -w -r1.2 audirix.h
--- audirix.h 9 Jul 2004 18:38:19 -0000 1.2
+++ audirix.h 26 Oct 2006 18:40:18 -0000
 -97,7
+97,7 
virtual HX_RESULT _WriteBytes( UCHAR* buffer, ULONG32
ulBuffLength,
LONG32& lCount );
//Device specific methods to open/close the mixer and
audio devices.
- virtual HX_RESULT _OpenAudio();
+ virtual HX_RESULT _OpenAudio(const HXAudioFormat* /*
pFormat */);
virtual HX_RESULT _CloseAudio();
virtual HX_RESULT _OpenMixer();
virtual HX_RESULT _CloseMixer();
Index: audlinux_esound.h
============================================================
=======
RCS file:
/cvsroot/audio/device/pub/platform/unix/audlinux_esound.h,v
retrieving revision 1.3
diff -u -w -r1.3 audlinux_esound.h
--- audlinux_esound.h 9 Jul 2004 18:38:19 -0000 1.3
+++ audlinux_esound.h 26 Oct 2006 18:40:20 -0000
 -115,7
+115,7 
virtual HX_RESULT _WriteBytes( UCHAR* buffer, ULONG32
ulBuffLength,
LONG32& lCount );
//Device specific methods to open/close the mixer and
audio devices.
- virtual HX_RESULT _OpenAudio();
+ virtual HX_RESULT _OpenAudio(const HXAudioFormat* /*
pFormat */);
virtual HX_RESULT _CloseAudio();
virtual HX_RESULT _OpenMixer();
virtual HX_RESULT _CloseMixer();
Index: audSolaris.h
============================================================
=======
RCS file:
/cvsroot/audio/device/pub/platform/unix/audSolaris.h,v
retrieving revision 1.3
diff -u -w -r1.3 audSolaris.h
--- audSolaris.h 9 Jul 2004 18:38:19 -0000 1.3
+++ audSolaris.h 26 Oct 2006 18:40:21 -0000
 -99,7
+99,7 
virtual HX_RESULT _WriteBytes( UCHAR* buffer, ULONG32
ulBuffLength,
LONG32& lCount );
//Device specific methods to open/close the mixer and
audio devices.
- virtual HX_RESULT _OpenAudio();
+ virtual HX_RESULT _OpenAudio(const HXAudioFormat* /*
pFormat */);
virtual HX_RESULT _CloseAudio();
virtual HX_RESULT _OpenMixer();
virtual HX_RESULT _CloseMixer();
Index: audusound.h
============================================================
=======
RCS file:
/cvsroot/audio/device/pub/platform/unix/audusound.h,v
retrieving revision 1.1
diff -u -w -r1.1 audusound.h
--- audusound.h 25 Mar 2004 22:09:53 -0000 1.1
+++ audusound.h 26 Oct 2006 18:40:23 -0000
 -97,7
+97,7 
virtual HX_RESULT _WriteBytes( UCHAR* buffer, ULONG32
ulBuffLength,
LONG32& lCount );
//Device specific methods to open/close the mixer and
audio devices.
- virtual HX_RESULT _OpenAudio();
+ virtual HX_RESULT _OpenAudio(const HXAudioFormat* /*
pFormat */);
virtual HX_RESULT _CloseAudio();
virtual HX_RESULT _OpenMixer();
virtual HX_RESULT _CloseMixer();
_______________________________________________
Audio-dev mailing list
Audio-dev helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/audio
-dev
|