41 static PRLogModuleInfo* gBaseMediacoreVolumeControl = nsnull;
42 #define TRACE(args) PR_LOG(gBaseMediacoreVolumeControl , PR_LOG_DEBUG, args)
43 #define LOG(args) PR_LOG(gBaseMediacoreVolumeControl , PR_LOG_WARN, args)
52 char volume[64] = {0};
53 PR_snprintf(volume, 64,
"%lg", aVol);
61 aStrVol.Assign(volume);
77 if (!gBaseMediacoreVolumeControl)
78 gBaseMediacoreVolumeControl = PR_NewLogModule(
"sbBaseMediacoreVolumeControl");
81 TRACE((
"sbBaseMediacoreVolumeControl[0x%x] - Created",
this));
86 TRACE((
"sbBaseMediacoreVolumeControl[0x%x] - Destroyed",
this));
91 nsAutoMonitor::DestroyMonitor(
mMonitor);
98 TRACE((
"sbBaseMediacoreVolumeControl[0x%x] - InitBaseMediacoreVolumeControl",
this));
100 mMonitor = nsAutoMonitor::NewMonitor(
"sbBaseMediacoreVolumeControl::mMonitor");
101 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_OUT_OF_MEMORY);
107 sbBaseMediacoreVolumeControl::GetMute(PRBool *aMute)
109 TRACE((
"sbBaseMediacoreVolumeControl[0x%x] - GetMute",
this));
110 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
111 NS_ENSURE_ARG_POINTER(aMute);
120 sbBaseMediacoreVolumeControl::SetMute(PRBool aMute)
122 TRACE((
"sbBaseMediacoreVolumeControl[0x%x] - SetMute",
this));
123 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
126 NS_ENSURE_SUCCESS(rv, rv);
135 sbBaseMediacoreVolumeControl::GetVolume(
double *aVolume)
137 TRACE((
"sbBaseMediacoreVolumeControl[0x%x] - GetVolume",
this));
138 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
139 NS_ENSURE_ARG_POINTER(aVolume);
148 sbBaseMediacoreVolumeControl::SetVolume(
double aVolume)
150 TRACE((
"sbBaseMediacoreVolumeControl[0x%x] - SetVolume",
this));
151 NS_ENSURE_TRUE(
mMonitor, NS_ERROR_NOT_INITIALIZED);
154 NS_ENSURE_SUCCESS(rv, rv);
170 return NS_ERROR_NOT_IMPLEMENTED;
184 return NS_ERROR_NOT_IMPLEMENTED;
198 return NS_ERROR_NOT_IMPLEMENTED;