Commit 4f4e7c4b authored by Claes Sjofors's avatar Claes Sjofors

wbl, configurable audio device in opplace object

parent cb882df0
......@@ -341,6 +341,14 @@ SObject pwrb:Class
Attr TypeRef = "pwrs:Type-$Boolean"
EndBody
EndObject
!/**
! Audio device.
!*/
Object AudioDevice $Attribute 51
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
Object Template OpPlace
Body RtBody
......
......@@ -4268,8 +4268,14 @@ int XNav::sound( pwr_tAttrRef *sound)
if ( !attach_audio)
return 0;
if ( !audio)
audio = new XttAudio( wow);
if ( !audio) {
char *dp = 0;
if ( strcmp( opplace_p->AudioDevice, "") != 0)
dp = opplace_p->AudioDevice;
audio = new XttAudio( wow, 0, dp);
}
if ( audio->audio_ok) {
audio->beep( sound);
......@@ -4283,9 +4289,14 @@ int XNav::sound_attached()
if ( !attach_audio)
return 0;
if ( !audio)
audio = new XttAudio( wow);
if ( !audio) {
char *dp = 0;
if ( strcmp( opplace_p->AudioDevice, "") != 0)
dp = opplace_p->AudioDevice;
audio = new XttAudio( wow, 0, dp);
}
if ( audio->audio_ok)
return 1;
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment