Commit cfbbde2a authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

winmm/tests: Get rid of unused functions.

parent 32d2082e
...@@ -456,24 +456,12 @@ DWORD bytes_to_samples(DWORD bytes, LPWAVEFORMATEX pwfx) ...@@ -456,24 +456,12 @@ DWORD bytes_to_samples(DWORD bytes, LPWAVEFORMATEX pwfx)
return bytes / pwfx->nBlockAlign; return bytes / pwfx->nBlockAlign;
} }
DWORD bytes_to_ms(DWORD bytes, LPWAVEFORMATEX pwfx)
{
return bytes_to_samples(bytes, pwfx) * 1000 / pwfx->nSamplesPerSec;
}
DWORD time_to_bytes(LPMMTIME mmtime, LPWAVEFORMATEX pwfx) DWORD time_to_bytes(LPMMTIME mmtime, LPWAVEFORMATEX pwfx)
{ {
if (mmtime->wType == TIME_BYTES) if (mmtime->wType == TIME_BYTES)
return mmtime->u.cb; return mmtime->u.cb;
else if (mmtime->wType == TIME_SAMPLES) else if (mmtime->wType == TIME_SAMPLES)
return mmtime->u.sample * pwfx->nBlockAlign; return mmtime->u.sample * pwfx->nBlockAlign;
else if (mmtime->wType == TIME_MS)
return mmtime->u.ms * pwfx->nAvgBytesPerSec / 1000;
else if (mmtime->wType == TIME_SMPTE)
return ((mmtime->u.smpte.hour * 60 * 60) +
(mmtime->u.smpte.min * 60) +
(mmtime->u.smpte.sec)) * pwfx->nAvgBytesPerSec +
mmtime->u.smpte.frame * pwfx->nAvgBytesPerSec / 30;
trace("FIXME: time_to_bytes() type not supported\n"); trace("FIXME: time_to_bytes() type not supported\n");
return -1; return -1;
......
...@@ -76,5 +76,4 @@ extern const char* wave_out_error(MMRESULT); ...@@ -76,5 +76,4 @@ extern const char* wave_out_error(MMRESULT);
extern const char* get_format_str(WORD format); extern const char* get_format_str(WORD format);
extern const char* wave_time_format(UINT type); extern const char* wave_time_format(UINT type);
extern DWORD bytes_to_samples(DWORD bytes, LPWAVEFORMATEX pwfx); extern DWORD bytes_to_samples(DWORD bytes, LPWAVEFORMATEX pwfx);
extern DWORD bytes_to_ms(DWORD bytes, LPWAVEFORMATEX pwfx);
extern DWORD time_to_bytes(LPMMTIME mmtime, LPWAVEFORMATEX pwfx); extern DWORD time_to_bytes(LPMMTIME mmtime, LPWAVEFORMATEX pwfx);
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