~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/dmusic/buffer.c

Version: ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /* IDirectMusicBuffer Implementation
  2  *
  3  * Copyright (C) 2003-2004 Rok Mandeljc
  4  *
  5  * This program is free software; you can redistribute it and/or
  6  * modify it under the terms of the GNU Lesser General Public
  7  * License as published by the Free Software Foundation; either
  8  * version 2.1 of the License, or (at your option) any later version.
  9  *
 10  * This program is distributed in the hope that it will be useful,
 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 13  * Lesser General Public License for more details.
 14  *
 15  * You should have received a copy of the GNU Lesser General Public
 16  * License along with this program; if not, write to the Free Software
 17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 18  */
 19 
 20 #include "dmusic_private.h"
 21 
 22 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
 23 
 24 /* IDirectMusicBufferImpl IUnknown part: */
 25 static HRESULT WINAPI IDirectMusicBufferImpl_QueryInterface (LPDIRECTMUSICBUFFER iface, REFIID riid, LPVOID *ppobj) {
 26         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
 27         TRACE("(%p, (%s, %p)\n",This,debugstr_dmguid(riid),ppobj);
 28         if (IsEqualIID (riid, &IID_IUnknown) 
 29                 || IsEqualIID (riid, &IID_IDirectMusicBuffer)) {
 30                 IUnknown_AddRef(iface);
 31                 *ppobj = This;
 32                 return S_OK;
 33         }
 34         WARN("(%p, (%s, %p): not found\n",This,debugstr_dmguid(riid),ppobj);
 35         return E_NOINTERFACE;
 36 }
 37 
 38 static ULONG WINAPI IDirectMusicBufferImpl_AddRef (LPDIRECTMUSICBUFFER iface) {
 39         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
 40         ULONG refCount = InterlockedIncrement(&This->ref);
 41 
 42         TRACE("(%p)->(ref before=%u)\n", This, refCount - 1);
 43 
 44         DMUSIC_LockModule();
 45 
 46         return refCount;
 47 }
 48 
 49 static ULONG WINAPI IDirectMusicBufferImpl_Release (LPDIRECTMUSICBUFFER iface) {
 50         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
 51         ULONG refCount = InterlockedDecrement(&This->ref);
 52 
 53         TRACE("(%p)->(ref before=%u)\n", This, refCount + 1);
 54 
 55         if (!refCount) {
 56                 HeapFree(GetProcessHeap(), 0, This);
 57         }
 58 
 59         DMUSIC_UnlockModule();
 60         
 61         return refCount;
 62 }
 63 
 64 /* IDirectMusicBufferImpl IDirectMusicBuffer part: */
 65 static HRESULT WINAPI IDirectMusicBufferImpl_Flush (LPDIRECTMUSICBUFFER iface) {
 66         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
 67         FIXME("(%p): stub\n", This);
 68         return S_OK;
 69 }
 70 
 71 static HRESULT WINAPI IDirectMusicBufferImpl_TotalTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prtTime) {
 72         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
 73         FIXME("(%p, %p): stub\n", This, prtTime);       
 74         return S_OK;
 75 }
 76 
 77 static HRESULT WINAPI IDirectMusicBufferImpl_PackStructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD dwChannelMessage) {
 78         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
 79         FIXME("(%p, 0x%s, %d, %d): stub\n", This, wine_dbgstr_longlong(rt), dwChannelGroup, dwChannelMessage);
 80         return S_OK;
 81 }
 82 
 83 static HRESULT WINAPI IDirectMusicBufferImpl_PackUnstructured (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD cb, LPBYTE lpb) {
 84         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
 85         FIXME("(%p, 0x%s, %d, %d, %p): stub\n", This, wine_dbgstr_longlong(rt), dwChannelGroup, cb, lpb);
 86         return S_OK;
 87 }
 88 
 89 static HRESULT WINAPI IDirectMusicBufferImpl_ResetReadPtr (LPDIRECTMUSICBUFFER iface) {
 90         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
 91         FIXME("(%p): stub\n", This);
 92         return S_OK;
 93 }
 94 
 95 static HRESULT WINAPI IDirectMusicBufferImpl_GetNextEvent (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt, LPDWORD pdwChannelGroup, LPDWORD pdwLength, LPBYTE* ppData) {
 96         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
 97         FIXME("(%p, %p, %p, %p, %p): stub\n", This, prt, pdwChannelGroup, pdwLength, ppData);
 98         return S_OK;
 99 }
100 
101 static HRESULT WINAPI IDirectMusicBufferImpl_GetRawBufferPtr (LPDIRECTMUSICBUFFER iface, LPBYTE* ppData) {
102         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
103         FIXME("(%p, %p): stub\n", This, ppData);
104         return S_OK;
105 }
106 
107 static HRESULT WINAPI IDirectMusicBufferImpl_GetStartTime (LPDIRECTMUSICBUFFER iface, LPREFERENCE_TIME prt) {
108         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
109         FIXME("(%p, %p): stub\n", This, prt);
110         return S_OK;
111 }
112 
113 static HRESULT WINAPI IDirectMusicBufferImpl_GetUsedBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb) {
114         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
115         FIXME("(%p, %p): stub\n", This, pcb);
116         return S_OK;
117 }
118 
119 static HRESULT WINAPI IDirectMusicBufferImpl_GetMaxBytes (LPDIRECTMUSICBUFFER iface, LPDWORD pcb) {
120         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
121         FIXME("(%p, %p): stub\n", This, pcb);
122         return S_OK;
123 }
124 
125 static HRESULT WINAPI IDirectMusicBufferImpl_GetBufferFormat (LPDIRECTMUSICBUFFER iface, LPGUID pGuidFormat) {
126         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
127         FIXME("(%p, %p): stub\n", This, pGuidFormat);
128         return S_OK;
129 }
130 
131 static HRESULT WINAPI IDirectMusicBufferImpl_SetStartTime (LPDIRECTMUSICBUFFER iface, REFERENCE_TIME rt) {
132         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
133         FIXME("(%p, 0x%s): stub\n", This, wine_dbgstr_longlong(rt));
134         return S_OK;
135 }
136 
137 static HRESULT WINAPI IDirectMusicBufferImpl_SetUsedBytes (LPDIRECTMUSICBUFFER iface, DWORD cb) {
138         IDirectMusicBufferImpl *This = (IDirectMusicBufferImpl *)iface;
139         FIXME("(%p, %d): stub\n", This, cb);
140         return S_OK;
141 }
142 
143 static const IDirectMusicBufferVtbl DirectMusicBuffer_Vtbl = {
144         IDirectMusicBufferImpl_QueryInterface,
145         IDirectMusicBufferImpl_AddRef,
146         IDirectMusicBufferImpl_Release,
147         IDirectMusicBufferImpl_Flush,
148         IDirectMusicBufferImpl_TotalTime,
149         IDirectMusicBufferImpl_PackStructured,
150         IDirectMusicBufferImpl_PackUnstructured,
151         IDirectMusicBufferImpl_ResetReadPtr,
152         IDirectMusicBufferImpl_GetNextEvent,
153         IDirectMusicBufferImpl_GetRawBufferPtr,
154         IDirectMusicBufferImpl_GetStartTime,
155         IDirectMusicBufferImpl_GetUsedBytes,
156         IDirectMusicBufferImpl_GetMaxBytes,
157         IDirectMusicBufferImpl_GetBufferFormat,
158         IDirectMusicBufferImpl_SetStartTime,
159         IDirectMusicBufferImpl_SetUsedBytes
160 };
161 
162 /* for ClassFactory */
163 HRESULT WINAPI DMUSIC_CreateDirectMusicBufferImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
164         IDirectMusicBufferImpl* dmbuff;
165         
166         dmbuff = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBufferImpl));
167         if (NULL == dmbuff) {
168                 *ppobj = NULL;
169                 return E_OUTOFMEMORY;
170         }
171         dmbuff->lpVtbl = &DirectMusicBuffer_Vtbl;
172         dmbuff->ref = 0; /* will be inited by QueryInterface */
173         
174         return IDirectMusicBufferImpl_QueryInterface ((LPDIRECTMUSICBUFFER)dmbuff, lpcGUID, ppobj);
175 }
176 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.