mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
sound: Correct handling of streams closed on the osd side.
This commit is contained in:
parent
1c55306841
commit
d37a9fd48c
@ -1713,9 +1713,11 @@ template<bool is_output, typename S> void sound_manager::apply_osd_changes(std::
|
|||||||
for(S &stream : streams) {
|
for(S &stream : streams) {
|
||||||
u32 sidx;
|
u32 sidx;
|
||||||
for(sidx = 0; sidx != m_osd_info.m_streams.size() && m_osd_info.m_streams[sidx].m_id != stream.m_id; sidx++);
|
for(sidx = 0; sidx != m_osd_info.m_streams.size() && m_osd_info.m_streams[sidx].m_id != stream.m_id; sidx++);
|
||||||
// If the stream has been lost, continue. It will be cleared in update_osd_streams.
|
// If the stream has been lost, mark it lost and continue. It will be cleared in update_osd_streams.
|
||||||
if(sidx == m_osd_info.m_streams.size())
|
if(sidx == m_osd_info.m_streams.size()) {
|
||||||
|
stream.m_id = 0;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if the target and/or the volumes changed
|
// Check if the target and/or the volumes changed
|
||||||
bool node_changed = stream.m_node != m_osd_info.m_streams[sidx].m_node;
|
bool node_changed = stream.m_node != m_osd_info.m_streams[sidx].m_node;
|
||||||
@ -1853,7 +1855,7 @@ void sound_manager::osd_information_update()
|
|||||||
// split stream case.
|
// split stream case.
|
||||||
if(machine().osd().sound_split_streams_per_source()) {
|
if(machine().osd().sound_split_streams_per_source()) {
|
||||||
apply_osd_changes<false, osd_input_stream >(m_osd_input_streams );
|
apply_osd_changes<false, osd_input_stream >(m_osd_input_streams );
|
||||||
apply_osd_changes<false, osd_output_stream>(m_osd_output_streams);
|
apply_osd_changes<true, osd_output_stream>(m_osd_output_streams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user