mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:51:11 +00:00
dmband: Support start_time and end_time Play parameters.
This commit is contained in:
parent
0b98e472b4
commit
1cf8f92a18
|
@ -159,7 +159,7 @@ static HRESULT WINAPI band_track_EndPlay(IDirectMusicTrack8 *iface, void *state_
|
|||
}
|
||||
|
||||
static HRESULT WINAPI band_track_Play(IDirectMusicTrack8 *iface, void *state_data,
|
||||
MUSIC_TIME start_time, MUSIC_TIME end_time, MUSIC_TIME time_offset, DWORD segment_flags,
|
||||
MUSIC_TIME start_time, MUSIC_TIME end_time, MUSIC_TIME time_offset, DWORD track_flags,
|
||||
IDirectMusicPerformance *performance, IDirectMusicSegmentState *segment_state, DWORD track_id)
|
||||
{
|
||||
struct band_track *This = impl_from_IDirectMusicTrack8(iface);
|
||||
|
@ -168,13 +168,11 @@ static HRESULT WINAPI band_track_Play(IDirectMusicTrack8 *iface, void *state_dat
|
|||
HRESULT hr;
|
||||
|
||||
TRACE("(%p, %p, %ld, %ld, %ld, %#lx, %p, %p, %ld)\n", This, state_data, start_time, end_time,
|
||||
time_offset, segment_flags, performance, segment_state, track_id);
|
||||
time_offset, track_flags, performance, segment_state, track_id);
|
||||
|
||||
if (!performance) return DMUS_S_END;
|
||||
|
||||
if (start_time != 0) FIXME("start_time %ld not implemented\n", start_time);
|
||||
if (end_time != -1) FIXME("end_time %ld not implemented\n", end_time);
|
||||
if (segment_flags) FIXME("segment_flags %#lx not implemented\n", segment_flags);
|
||||
if (track_flags) FIXME("track_flags %#lx not implemented\n", track_flags);
|
||||
if (segment_state) FIXME("segment_state %p not implemented\n", segment_state);
|
||||
|
||||
if (FAILED(hr = IDirectMusicPerformance_QueryInterface(performance,
|
||||
|
@ -184,7 +182,13 @@ static HRESULT WINAPI band_track_Play(IDirectMusicTrack8 *iface, void *state_dat
|
|||
LIST_FOR_EACH_ENTRY(entry, &This->bands, struct band_entry, entry)
|
||||
{
|
||||
MUSIC_TIME music_time = entry->head.lBandTimeLogical;
|
||||
if (music_time != -1) music_time += time_offset;
|
||||
if (music_time == -1 && !(track_flags & DMUS_TRACKF_START)) continue;
|
||||
else if (music_time != -1)
|
||||
{
|
||||
if (music_time < start_time || music_time >= end_time) continue;
|
||||
music_time += time_offset;
|
||||
}
|
||||
|
||||
if (FAILED(hr = band_send_messages(entry->band, performance, graph, music_time, track_id)))
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue