Hello, I'm using code as shown below to play the first duration milliseconds of a media file
MCIWndHome(m_Audio);
MCIWndPlayTo(m_Audio, duration);
This works fine to only play the first duration milliseconds when the length of the audio file is greater than duration, but if the audio is longer than that I get the error "The specified parameter is out of range for the specified command."
The documentation says:
The MCIWndPlayTo macro plays the content of an MCI device from the current position to the specified ending location or until another command stops playback. If the specified ending location is beyond the end of the content, playback stops at the end of the content.
So I figured I could put whatever I want in for the ending location and it would always either stop at the specified end location or at the end of the media, whichever comes first. Instead I get the error and it doesn't play at all.
What am I doing wrong? Why wouldn't this work?