Changeset 2456 for trunk/src


Ignore:
Timestamp:
Jan 15, 2000, 11:02:50 PM (26 years ago)
Author:
sandervl
Message:

JW: Updated to Wine level 20000109 + corrected compile errors

Location:
trunk/src/winmm
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/winmm/mcianim/initterm.cpp

    r2308 r2456  
    1 /* $Id: initterm.cpp,v 1.1 2000-01-03 10:29:27 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.2 2000-01-15 22:02:48 sandervl Exp $ */
    22
    33/*
     
    3232#include <string.h>
    3333#include <odin.h>
     34#include <win32type.h>
     35#include <odinlx.h>
    3436#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3537
  • trunk/src/winmm/mcianim/makefile

    r2308 r2456  
    1 # $Id: makefile,v 1.1 2000-01-03 10:29:28 sandervl Exp $
     1# $Id: makefile,v 1.2 2000-01-15 22:02:48 sandervl Exp $
    22
    33#
     
    77#
    88
    9 PDWIN32_INCLUDE = ..\..\include
    10 PDWIN32_LIB = ..\..\lib
    11 PDWIN32_BIN = ..\..\bin
     9PDWIN32_INCLUDE = ..\..\..\include
     10PDWIN32_LIB = ..\..\..\lib
     11PDWIN32_BIN = ..\..\..\bin
    1212
    1313
  • trunk/src/winmm/mciavi32/initterm.cpp

    r2308 r2456  
    1 /* $Id: initterm.cpp,v 1.1 2000-01-03 10:29:02 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.2 2000-01-15 22:02:49 sandervl Exp $ */
    22
    33/*
     
    3232#include <string.h>
    3333#include <odin.h>
     34#include <win32type.h>
     35#include <odinlx.h>
    3436#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3537
  • trunk/src/winmm/mciavi32/makefile

    r2308 r2456  
    1 # $Id: makefile,v 1.1 2000-01-03 10:29:03 sandervl Exp $
     1# $Id: makefile,v 1.2 2000-01-15 22:02:49 sandervl Exp $
    22
    33#
     
    77#
    88
    9 PDWIN32_INCLUDE = ..\..\include
    10 PDWIN32_LIB = ..\..\lib
    11 PDWIN32_BIN = ..\..\bin
     9PDWIN32_INCLUDE = ..\..\..\include
     10PDWIN32_LIB = ..\..\..\lib
     11PDWIN32_BIN = ..\..\..\bin
    1212
    1313
  • trunk/src/winmm/mciseq/initterm.cpp

    r2308 r2456  
    1 /* $Id: initterm.cpp,v 1.1 2000-01-03 10:29:03 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.2 2000-01-15 22:02:49 sandervl Exp $ */
    22
    33/*
     
    3232#include <string.h>
    3333#include <odin.h>
     34#include <win32type.h>
     35#include <odinlx.h>
    3436#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3537
  • trunk/src/winmm/mciseq/makefile

    r2308 r2456  
    1 # $Id: makefile,v 1.1 2000-01-03 10:29:03 sandervl Exp $
     1# $Id: makefile,v 1.2 2000-01-15 22:02:49 sandervl Exp $
    22
    33#
     
    77#
    88
    9 PDWIN32_INCLUDE = ..\..\include
    10 PDWIN32_LIB = ..\..\lib
    11 PDWIN32_BIN = ..\..\bin
     9PDWIN32_INCLUDE = ..\..\..\include
     10PDWIN32_LIB = ..\..\..\lib
     11PDWIN32_BIN = ..\..\..\bin
    1212
    1313
  • trunk/src/winmm/mciseq/mciseq.cpp

    r2308 r2456  
    5151    HMMIO               hFile;                  /* mmio file handle open as Element          */
    5252    LPCSTR              lpstrElementName;       /* Name of file */
     53    LPCSTR              lpstrCopyright;
     54    LPCSTR              lpstrName;             
    5355    WORD                dwStatus;               /* one from MCI_MODE_xxxx */
    5456    DWORD               dwMciTimeFormat;        /* One of the supported MCI_FORMAT_xxxx */             
     
    371373    mmt->dwEventPulse = 0;
    372374   
    373     while (MIDI_mciReadNextEvent(wmm, mmt) == 0 &&
    374            LOWORD(mmt->dwEventData) != 0x2FFF) {       
     375    while (MIDI_mciReadNextEvent(wmm, mmt) == 0 && LOWORD(mmt->dwEventData) != 0x2FFF) {
     376        char    buf[1024];
     377        WORD    len;
     378
    375379        mmt->dwIndex += mmt->wEventLength;
     380
     381        switch (LOWORD(mmt->dwEventData)) {
     382        case 0x02FF:
     383        case 0x03FF:
     384            /* position after meta data header */
     385            mmioSeek(wmm->hFile, mmt->dwIndex + HIWORD(mmt->dwEventData), SEEK_SET);
     386            len = mmt->wEventLength - HIWORD(mmt->dwEventData);
     387                   
     388            if (len >= sizeof(buf)) {
     389                WARN("Buffer for text is too small (%d bytes, when %u are needed)\n", sizeof(buf) - 1, len);
     390                len = sizeof(buf) - 1;
     391            }
     392            if (mmioRead(wmm->hFile, (HPSTR)buf, len) == len) {
     393                buf[len] = 0;   /* end string in case */
     394                switch (HIBYTE(LOWORD(mmt->dwEventData))) {
     395                case 0x02:
     396                    if (wmm->lpstrCopyright) {
     397                        WARN("Two copyright notices (%s|%s)\n", wmm->lpstrCopyright, buf);
     398                    } else {
     399                        wmm->lpstrCopyright = HEAP_strdupA(GetProcessHeap(), 0, buf);
     400                    }
     401                    break;
     402                case 0x03:
     403                    if (wmm->lpstrCopyright) {
     404                        WARN("Two names (%s|%s)\n", wmm->lpstrName, buf);
     405                    } else {
     406                        wmm->lpstrName = HEAP_strdupA(GetProcessHeap(), 0, buf);
     407                    }
     408                    break;
     409                }
     410            }
     411            break;
     412        }
    376413    }
    377414    mmt->dwLength = mmt->dwEventPulse;
     
    681718   
    682719    if (dwFlags & MCI_OPEN_ELEMENT) {
    683         LPSTR           lpstrElementName;
    684        
    685         lpstrElementName = lpParms->lpstrElementName;
    686        
    687         TRACE("MCI_OPEN_ELEMENT '%s' !\n", lpstrElementName);
    688         if (lpstrElementName && strlen(lpstrElementName) > 0) {
    689             wmm->hFile = mmioOpenA(lpstrElementName, NULL,
     720        TRACE("MCI_OPEN_ELEMENT '%s' !\n", lpParms->lpstrElementName);
     721        if (lpParms->lpstrElementName && strlen(lpParms->lpstrElementName) > 0) {
     722            wmm->hFile = mmioOpenA(lpParms->lpstrElementName, NULL,
    690723                                   MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
    691724            if (wmm->hFile == 0) {
    692                 WARN("Can't find file '%s' !\n", lpstrElementName);
     725                WARN("Can't find file '%s' !\n", lpParms->lpstrElementName);
    693726                wmm->nUseCount--;
    694727                return MCIERR_FILE_NOT_FOUND;
     
    701734   
    702735    /* FIXME: should I get a strdup() of it instead? */
    703     wmm->lpstrElementName = lpParms->lpstrElementName;
    704    
     736    wmm->lpstrElementName = HEAP_strdupA(GetProcessHeap(), 0, lpParms->lpstrElementName);
     737    wmm->lpstrCopyright = NULL;
     738    wmm->lpstrName = NULL;
     739
    705740    wmm->wNotifyDeviceID = dwDeviceID;
    706741    wmm->dwStatus = MCI_MODE_NOT_READY; /* while loading file contents */
     
    801836        }
    802837        HeapFree(GetProcessHeap(), 0, wmm->tracks);
     838        HeapFree(GetProcessHeap(), 0, (LPSTR)wmm->lpstrElementName);
     839        HeapFree(GetProcessHeap(), 0, (LPSTR)wmm->lpstrCopyright);
     840        HeapFree(GetProcessHeap(), 0, (LPSTR)wmm->lpstrName);
    803841    } else {
    804842        TRACE("Shouldn't happen... nUseCount=%d\n", wmm->nUseCount);
     
    906944    wmm->wStartedPlaying = FALSE;
    907945   
    908     dwRet = midiOutOpen(&wmm->hMidi, 0, 0L, 0L, CALLBACK_NULL);
    909     /*  dwRet = midiInOpen(&wmm->hMidi, 0, 0L, 0L, CALLBACK_NULL);*/
     946    dwRet = midiOutOpen(&wmm->hMidi, MIDIMAPPER, 0L, 0L, CALLBACK_NULL);
     947    /*  dwRet = midiInOpen(&wmm->hMidi, MIDIMAPPER, 0L, 0L, CALLBACK_NULL);*/
    910948
    911949    while (wmm->dwStatus != MCI_MODE_STOP) {
     
    9871025                        TRACE("%s => \"%s\"\n", (idx < 8 ) ? info[idx] : "", buf);
    9881026                    } else {
    989                         WARN("Couldn't read data for %s\n", (idx < 8 ) ? info[idx] : "");
     1027                        WARN("Couldn't read data for %s\n", (idx < 8) ? info[idx] : "");
    9901028                    }
    9911029                }
     
    15081546    TRACE("buf=%p, len=%lu\n", lpParms->lpstrReturn, lpParms->dwRetSize);
    15091547   
    1510     switch (dwFlags) {
     1548    switch (dwFlags & ~(MCI_WAIT|MCI_NOTIFY)) {
    15111549    case MCI_INFO_PRODUCT:
    15121550        str = "Wine's MIDI sequencer";
     
    15151553        str = wmm->lpstrElementName;
    15161554        break;
    1517 #if 0
    1518         /* FIXME: the following manifest constants are not defined in <WINE>/include/mmsystem.h */
    15191555    case MCI_INFO_COPYRIGHT:
     1556        str = wmm->lpstrCopyright;
     1557        break; 
     1558    case MCI_INFO_NAME:
     1559        str = wmm->lpstrName;
    15201560        break;
    1521     case MCI_INFO_NAME:
    1522         break;
    1523 #endif
    15241561    default:
    15251562        WARN("Don't know this info command (%lu)\n", dwFlags);
  • trunk/src/winmm/mciwave/initterm.cpp

    r2308 r2456  
    1 /* $Id: initterm.cpp,v 1.1 2000-01-03 10:29:03 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.2 2000-01-15 22:02:49 sandervl Exp $ */
    22
    33/*
     
    3232#include <string.h>
    3333#include <odin.h>
     34#include <win32type.h>
     35#include <odinlx.h>
    3436#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3537
  • trunk/src/winmm/mciwave/makefile

    r2308 r2456  
    1 # $Id: makefile,v 1.1 2000-01-03 10:29:04 sandervl Exp $
     1# $Id: makefile,v 1.2 2000-01-15 22:02:49 sandervl Exp $
    22
    33#
     
    77#
    88
    9 PDWIN32_INCLUDE = ..\..\include
    10 PDWIN32_LIB = ..\..\lib
    11 PDWIN32_BIN = ..\..\bin
     9PDWIN32_INCLUDE = ..\..\..\include
     10PDWIN32_LIB = ..\..\..\lib
     11PDWIN32_BIN = ..\..\..\bin
    1212
    1313
  • trunk/src/winmm/mciwave/mciwave.cpp

    r2308 r2456  
    3131    LPWAVEFORMATEX              lpWaveFormat;
    3232    BOOL                        fInput;         /* FALSE = Output, TRUE = Input */
    33     WORD                        dwStatus;       /* one from MCI_MODE_xxxx */
     33    volatile WORD               dwStatus;       /* one from MCI_MODE_xxxx */
    3434    DWORD                       dwMciTimeFormat;/* One of the supported MCI_FORMAT_xxxx */
    3535    DWORD                       dwFileOffset;   /* Offset of chunk in mmio file */
     
    3838    HANDLE                      hEvent;         /* for synchronization */
    3939    DWORD                       dwEventCount;   /* for synchronization */
    40 } WINE_MCIWAVE, *PWINE_MCIWAVE;
     40} WINE_MCIWAVE;
    4141
    4242/* ===================================================================
     
    128128static  DWORD   WAVE_drvOpen(LPSTR str, LPMCI_OPEN_DRIVER_PARMSA modp)
    129129{
    130     WINE_MCIWAVE*       wmw = PWINE_MCIWAVE(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_MCIWAVE)));
     130    WINE_MCIWAVE*       wmw = (WINE_MCIWAVE*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINE_MCIWAVE));
    131131
    132132    if (!wmw)
     
    435435                dwRet = (wmw->fInput) ? waveInReset(wmw->hWave) : waveOutReset(wmw->hWave);
    436436        }
    437         while (((volatile WINE_MCIWAVE*)wmw)->dwStatus != MCI_MODE_STOP)
     437        while (wmw->dwStatus != MCI_MODE_STOP)
    438438            Sleep(10);
    439439        break;
     
    553553    }
    554554   
     555        if (wmw->dwStatus == MCI_MODE_PAUSE) {
     556            /* FIXME: parameters (start/end) in lpParams may not be used */
     557            return WAVE_mciResume(wDevID, dwFlags, (LPMCI_GENERIC_PARMS)lpParms);
     558        }
     559   
     560    /** This function will be called again by a thread when async is used.
     561     * We have to set MCI_MODE_PLAY before we do this so that the app can spin
     562     * on MCI_STATUS, so we have to allow it here if we're not going to start this thread.
     563     */
     564    if ((wmw->dwStatus != MCI_MODE_STOP) && ((wmw->dwStatus != MCI_MODE_PLAY) && (dwFlags & MCI_WAIT))) {
     565        return MCIERR_INTERNAL;
     566    }
     567
     568    wmw->dwStatus = MCI_MODE_PLAY;
     569   
    555570    if (!(dwFlags & MCI_WAIT)) {
    556571        return MCI_SendCommandAsync(wmw->wNotifyDeviceID, MCI_PLAY, dwFlags,
    557572                                    (DWORD)lpParms, sizeof(MCI_PLAY_PARMS));
    558     }
    559 
    560     if (wmw->dwStatus != MCI_MODE_STOP) {
    561         if (wmw->dwStatus == MCI_MODE_PAUSE) {
    562             /* FIXME: parameters (start/end) in lpParams may not be used */
    563             return WAVE_mciResume(wDevID, dwFlags, (LPMCI_GENERIC_PARMS)lpParms);
    564         }
    565         return MCIERR_INTERNAL;
    566573    }
    567574
     
    628635
    629636    TRACE("Playing (normalized) from byte=%lu for %lu bytes\n", wmw->dwPosition, left);
    630     wmw->dwStatus = MCI_MODE_PLAY;
    631637   
    632638    /* FIXME: this doesn't work if wmw->dwPosition != 0 */
     
    719725    }
    720726    bufsize = 64000;
    721     waveHdr.lpData = (CHAR*)HeapAlloc(GetProcessHeap(), 0, bufsize);
     727    waveHdr.lpData = (char*)HeapAlloc(GetProcessHeap(), 0, bufsize);
    722728    waveHdr.dwBufferLength = bufsize;
    723729    waveHdr.dwUser = 0L;
  • trunk/src/winmm/midimap/initterm.cpp

    r2308 r2456  
    1 /* $Id: initterm.cpp,v 1.1 2000-01-03 10:29:04 sandervl Exp $ */
     1/* $Id: initterm.cpp,v 1.2 2000-01-15 22:02:50 sandervl Exp $ */
    22
    33/*
     
    3232#include <string.h>
    3333#include <odin.h>
     34#include <win32type.h>
     35#include <odinlx.h>
    3436#include <misc.h>       /*PLF Wed  98-03-18 23:18:15*/
    3537
  • trunk/src/winmm/midimap/makefile

    r2308 r2456  
    1 # $Id: makefile,v 1.1 2000-01-03 10:29:05 sandervl Exp $
     1# $Id: makefile,v 1.2 2000-01-15 22:02:50 sandervl Exp $
    22
    33#
     
    77#
    88
    9 PDWIN32_INCLUDE = ..\..\include
    10 PDWIN32_LIB = ..\..\lib
    11 PDWIN32_BIN = ..\..\bin
     9PDWIN32_INCLUDE = ..\..\..\include
     10PDWIN32_LIB = ..\..\..\lib
     11PDWIN32_BIN = ..\..\..\bin
    1212
    1313
Note: See TracChangeset for help on using the changeset viewer.