Changeset 255
- Timestamp:
- Feb 9, 2011, 9:08:56 PM (15 years ago)
- Location:
- trunk/openjdk/jdk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk/jdk/make/javax/sound/FILES_c.gmk
r2 r255 41 41 PLATFORM_API_WinOS_Ports.c 42 42 43 FILES_os2 = \ 44 PLATFORM_API_WinOS_MidiIn.c \ 45 PLATFORM_API_WinOS_MidiOut.c \ 46 PLATFORM_API_WinOS_Util.c \ 47 PLATFORM_API_WinOS_Ports.c 48 43 49 FILES_export = \ 44 50 com/sun/media/sound/Platform.java -
trunk/openjdk/jdk/make/javax/sound/Makefile
r2 r255 100 100 #MXSPP_ADD = $(PLATFORM)-$(ARCH)/ 101 101 endif # PLATFORM win32 102 103 ifeq ($(PLATFORM), os2) 104 CPPFLAGS += -DUSE_PLATFORM_MIDI_OUT=TRUE \ 105 -DUSE_PLATFORM_MIDI_IN=TRUE \ 106 -DUSE_PORTS=TRUE 107 LDLIBS += -lwinmm.lib 108 109 # Odin32 always provides MIDI and ports 110 INCLUDE_MIDI = TRUE 111 INCLUDE_PORTS = TRUE 112 113 # DirectSound handles directaudio (both i586 and amd64) 114 SUBDIRS += jsoundds 115 EXTRA_SOUND_JNI_LIBS += jsoundds 116 #MXSPP_ADD = $(PLATFORM)-$(ARCH)/ 117 endif # PLATFORM os2 102 118 103 119 ifeq ($(PLATFORM), linux) -
trunk/openjdk/jdk/make/javax/sound/jsoundds/Makefile
r2 r255 53 53 # Extra cc/linker flags. 54 54 # 55 ifeq ($(PLATFORM), os2) 56 LDLIBS += -ldsound.lib -lwinmm.lib -luser32.lib 57 CPPFLAGS += \ 58 -DUSE_DAUDIO=TRUE \ 59 -I$(SHARE_SRC)/native/com/sun/media/sound 60 else 55 61 LDLIBS += dsound.lib winmm.lib user32.lib 56 62 CPPFLAGS += \ … … 58 64 -I$(SHARE_SRC)/native/com/sun/media/sound \ 59 65 -I$(DXSDK_INCLUDE_PATH) 66 endif 60 67 61 68 # -
trunk/openjdk/jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_DirectSound.cpp
r254 r255 90 90 } 91 91 92 #ifdef __WIN32OS2__ 93 static GUID CLSID_DAUDIO_Zero = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}; 94 #else 92 95 static GUID CLSID_DAUDIO_Zero = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 96 #endif 93 97 94 98 BOOL isEqualGUID(LPGUID lpGuid1, LPGUID lpGuid2) { … … 199 203 } 200 204 } 205 #ifndef __WIN32OS2__ 201 206 oldCount = rs.currMixerIndex; 202 207 rs.isSource = FALSE; … … 212 217 } 213 218 } 219 #endif 214 220 g_mixerCount = rs.currMixerIndex; 215 221 … … 255 261 strncpy(desc->description, "DirectSound Playback", DAUDIO_STRING_LENGTH); 256 262 } else { 263 #ifndef __WIN32OS2__ 257 264 DirectSoundCaptureEnumerate((LPDSENUMCALLBACK) DS_GetDescEnum, desc); 258 265 strncpy(desc->description, "DirectSound Capture", DAUDIO_STRING_LENGTH); 266 #endif 259 267 } 260 268 … … 480 488 if (data.line2Start->isSource) { 481 489 data.startResult = 482 data.line2Start->playBuffer->Play(0, 0, DS CBSTART_LOOPING);490 data.line2Start->playBuffer->Play(0, 0, DSBPLAY_LOOPING); 483 491 } else { 492 #ifndef __WIN32OS2__ 484 493 data.startResult = 485 494 data.line2Start->captureBuffer->Start(DSCBSTART_LOOPING); 495 #endif 486 496 } 487 497 ::SetEvent(data.startedEvent); … … 545 555 g_audioDeviceCache[deviceID].dev = (void*) devPlay; 546 556 } else { 557 #ifndef __WIN32OS2__ 547 558 res = DirectSoundCaptureCreate(lpGuid, &devCapture, NULL); 548 559 g_audioDeviceCache[deviceID].dev = (void*) devCapture; 560 #endif 549 561 } 550 562 g_audioDeviceCache[deviceID].refCount = 0; … … 584 596 DEV_PLAY(deviceID)->Release(); 585 597 } else { 598 #ifndef __WIN32OS2__ 586 599 DEV_CAPTURE(deviceID)->Release(); 600 #endif 587 601 } 588 602 g_audioDeviceCache[deviceID].dev = NULL; … … 611 625 612 626 #if !defined(DEFINE_WAVEFORMATEX_GUID) 627 #ifdef __WIN32OS2__ 628 #define DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x), 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } 629 #else 613 630 #define DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 631 #endif 614 632 #endif 615 633 #ifndef STATIC_KSDATAFORMAT_SUBTYPE_PCM … … 725 743 } 726 744 } else { 745 #ifndef __WIN32OS2__ 727 746 if (FAILED(info->captureBuffer->Lock(0, 728 747 info->dsBufferSizeInBytes, … … 733 752 return; 734 753 } 754 #endif 735 755 } 736 756 if (pb1!=NULL) { … … 756 776 DEBUG_SILENCING2(" silencedBytes=%d, my writePos=%d\n", (int)info->silencedBytes, (int)info->writePos); 757 777 } else { 778 #ifndef __WIN32OS2__ 758 779 info->captureBuffer->Unlock( pb1, cb1, pb2, cb2 ); 780 #endif 759 781 } 760 782 TRACE0("< DS_clearbuffer\n"); … … 768 790 int bufferSizeInBytes) { 769 791 DSBUFFERDESC dsbdesc; 792 #ifndef __WIN32OS2__ 770 793 DSCBUFFERDESC dscbdesc; 794 #endif 771 795 HRESULT res; 772 796 WAVEFORMATEXTENSIBLE format; … … 800 824 (&dsbdesc, (LPDIRECTSOUNDBUFFER*) &buffer, NULL); 801 825 } else { 826 #ifndef __WIN32OS2__ 802 827 memset(&dscbdesc, 0, sizeof(DSCBUFFERDESC)); 803 828 dscbdesc.dwSize = sizeof(DSCBUFFERDESC); … … 807 832 res = DEV_CAPTURE(info->deviceID)->CreateCaptureBuffer 808 833 (&dscbdesc, (LPDIRECTSOUNDCAPTUREBUFFER*) &buffer, NULL); 834 #endif 809 835 } 810 836 if (FAILED(res)) { … … 821 847 } 822 848 if (info->captureBuffer != NULL) { 849 #ifndef __WIN32OS2__ 823 850 info->captureBuffer->Release(); 824 851 info->captureBuffer = NULL; 852 #endif 825 853 } 826 854 } … … 953 981 } 954 982 } else { 983 #ifndef __WIN32OS2__ 955 984 if (info->captureBuffer->GetStatus(&status) == DS_OK) { 956 985 if (status & DSCBSTATUS_LOOPING) { … … 960 989 } 961 990 res = DS_StartBufferHelper::StartBuffer(info); 991 #endif 962 992 } 963 993 if (FAILED(res)) { … … 978 1008 info->playBuffer->Stop(); 979 1009 } else { 1010 #ifndef __WIN32OS2__ 980 1011 info->captureBuffer->Stop(); 1012 #endif 981 1013 } 982 1014 … … 1089 1121 } 1090 1122 } else { 1123 #ifndef __WIN32OS2__ 1091 1124 if (FAILED(info->captureBuffer->GetCurrentPosition(playCursor, writeCursor))) { 1092 1125 ERROR0("DS_GetAvailable: ERROR: Failed to get current position.\n"); … … 1126 1159 available = info->bufferSizeInBytes; 1127 1160 } 1161 #endif 1128 1162 } 1129 1163 available = (available / info->frameSize) * info->frameSize; … … 1238 1272 TRACE1("> DAUDIO_Read %d bytes\n", byteSize); 1239 1273 1274 #ifndef __WIN32OS2__ 1240 1275 available = DS_GetAvailable(info, &captureCursor, &readCursor, &bufferSize, FALSE /* fromCaptureCursor? */); 1241 1276 if (byteSize > available) byteSize = available; … … 1280 1315 } 1281 1316 } 1317 #else 1318 byteSize = -1; 1319 #endif 1282 1320 1283 1321 TRACE1("< DAUDIO_Read: returning %d bytes.\n", byteSize); … … 1316 1354 DS_clearBuffer(info, FALSE /* entire buffer */); 1317 1355 } else { 1356 #ifndef __WIN32OS2__ 1318 1357 DWORD captureCursor, readCursor; 1319 1358 /* set the read pointer to the current read position */ … … 1328 1367 */ 1329 1368 info->writePos = (int) readCursor; 1369 #endif 1330 1370 } 1331 1371 return TRUE; -
trunk/openjdk/jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_MidiOut.c
r2 r255 29 29 #include "PLATFORM_API_WinOS_Util.h" 30 30 31 #ifdef __EMX__ 32 #include <string.h> 33 #include <memory.h> 34 #endif 35 31 36 #if USE_PLATFORM_MIDI_OUT == TRUE 32 37 -
trunk/openjdk/jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_Ports.c
r2 r255 71 71 #define PORT_CONTROL_TYPE_MIXER 6 72 72 73 typedefstruct tag_PortControlID {73 struct tag_PortControlID { 74 74 PortInfo* portInfo; 75 75 INT32 controlType; // one of PORT_CONTROL_TYPE_XX … … 83 83 INT32 muxIndex; 84 84 }; 85 } PortControlID;85 }; 86 86 87 87 -
trunk/openjdk/jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_Util.c
r2 r255 29 29 30 30 #include "PLATFORM_API_WinOS_Util.h" 31 32 #ifdef __EMX__ 33 #include <string.h> 34 #include <memory.h> 35 #endif 31 36 32 37 #if (USE_PLATFORM_MIDI_IN == TRUE) || (USE_PLATFORM_MIDI_OUT == TRUE) -
trunk/openjdk/jdk/src/windows/native/com/sun/media/sound/PLATFORM_API_WinOS_Util.h
r253 r255 36 36 /* for waveformat extensible */ 37 37 #include <mmreg.h> 38 #ifndef __WIN32OS2__ 38 39 #include <ks.h> 40 #endif 39 41 40 42 #ifndef PLATFORM_API_WINOS_UTIL_INCLUDED
Note:
See TracChangeset
for help on using the changeset viewer.