mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
First cut at WM8750 volume control (Jan Kiszka).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4321 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
3945462805
commit
683efdcbdb
3 changed files with 70 additions and 32 deletions
|
@ -117,8 +117,8 @@ volume_t nominal_volume = {
|
|||
1.0,
|
||||
1.0
|
||||
#else
|
||||
UINT_MAX,
|
||||
UINT_MAX
|
||||
1ULL << 32,
|
||||
1ULL << 32
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1955,3 +1955,21 @@ void AUD_del_capture (CaptureVoiceOut *cap, void *cb_opaque)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AUD_set_volume_out (SWVoiceOut *sw, int mute, uint8_t lvol, uint8_t rvol)
|
||||
{
|
||||
if (sw) {
|
||||
sw->vol.mute = mute;
|
||||
sw->vol.l = nominal_volume.l * lvol / 255;
|
||||
sw->vol.r = nominal_volume.r * rvol / 255;
|
||||
}
|
||||
}
|
||||
|
||||
void AUD_set_volume_in (SWVoiceIn *sw, int mute, uint8_t lvol, uint8_t rvol)
|
||||
{
|
||||
if (sw) {
|
||||
sw->vol.mute = mute;
|
||||
sw->vol.l = nominal_volume.l * lvol / 255;
|
||||
sw->vol.r = nominal_volume.r * rvol / 255;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,6 +124,9 @@ int AUD_is_active_out (SWVoiceOut *sw);
|
|||
void AUD_init_time_stamp_out (SWVoiceOut *sw, QEMUAudioTimeStamp *ts);
|
||||
uint64_t AUD_get_elapsed_usec_out (SWVoiceOut *sw, QEMUAudioTimeStamp *ts);
|
||||
|
||||
void AUD_set_volume_out (SWVoiceOut *sw, int mute, uint8_t lvol, uint8_t rvol);
|
||||
void AUD_set_volume_in (SWVoiceIn *sw, int mute, uint8_t lvol, uint8_t rvol);
|
||||
|
||||
SWVoiceIn *AUD_open_in (
|
||||
QEMUSoundCard *card,
|
||||
SWVoiceIn *sw,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue