source: branches/common_functions/mm_funcs.c@ 173

Last change on this file since 173 was 4, checked in by stevenhl, 8 years ago

Import modifications from cwmm-0_2_9-work-01_10_2006.zip dated 2006-08-27

File size: 1.7 KB
Line 
1#define INCL_OS2MM
2
3#include <os2.h>
4#include "os2me.h"
5
6#if __cplusplus
7extern "C" {
8#endif
9
10/*!**************************************************/
11/* */
12/* @@DESC */
13/* */
14/* This funktion returns the mediatype for the */
15/* given file. */
16/* */
17/* @@RETURNS */
18/* */
19/* ULONG MMIO_MEDIATYPE_ */
20/* */
21/* MMIO mediatype as identified by MMOS2. */
22/* */
23/*!!*************************************************/
24ULONG MMIdentifyFile(char* chrFile)
25{
26 MMIOINFO mmioInfo={0};
27 MMFORMATINFO mmFormatInfo={0};
28 FOURCC fourCC;
29
30 if(MMIO_SUCCESS!=mmioIdentifyFile(chrFile, &mmioInfo, &mmFormatInfo, &fourCC, 0,0))
31 {
32 return MMIO_MEDIATYPE_UNKNOWN;
33 }
34
35 switch(mmFormatInfo.ulMediaType)
36 {
37 case MMIO_MEDIATYPE_MIDI: /* Midi */
38 return MMIO_MEDIATYPE_MIDI;
39 case MMIO_MEDIATYPE_AUDIO: /* Any other audio file */
40 return MMIO_MEDIATYPE_AUDIO;
41 case MMIO_MEDIATYPE_IMAGE:
42 return MMIO_MEDIATYPE_IMAGE;
43 case MMIO_MEDIATYPE_DIGITALVIDEO:
44 return MMIO_MEDIATYPE_DIGITALVIDEO;
45 case MMIO_MEDIATYPE_MOVIE:
46 return MMIO_MEDIATYPE_MOVIE;
47 default:
48 return MMIO_MEDIATYPE_UNKNOWN;
49 }
50
51 return 0;
52}
53
54#if __cplusplus
55}
56#endif
57
Note: See TracBrowser for help on using the repository browser.