2003-07-22 00:10:14 +02:00
|
|
|
/* IDirectMusicSegmentState8 Implementation
|
|
|
|
*
|
2004-01-20 01:21:40 +01:00
|
|
|
* Copyright (C) 2003-2004 Rok Mandeljc
|
2003-07-22 00:10:14 +02:00
|
|
|
*
|
2007-05-30 12:54:07 +02:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2003-07-22 00:10:14 +02:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-05-30 12:54:07 +02:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2003-07-22 00:10:14 +02:00
|
|
|
*
|
2007-05-30 12:54:07 +02:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2003-07-22 00:10:14 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "dmime_private.h"
|
2019-12-12 01:11:02 +01:00
|
|
|
#include "dmobject.h"
|
2003-07-22 00:10:14 +02:00
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(dmime);
|
2003-07-22 00:10:14 +02:00
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
typedef struct IDirectMusicSegmentState8Impl {
|
|
|
|
IDirectMusicSegmentState8 IDirectMusicSegmentState8_iface;
|
|
|
|
LONG ref;
|
|
|
|
} IDirectMusicSegmentState8Impl;
|
|
|
|
|
|
|
|
static inline IDirectMusicSegmentState8Impl *impl_from_IDirectMusicSegmentState8(IDirectMusicSegmentState8 *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IDirectMusicSegmentState8Impl, IDirectMusicSegmentState8_iface);
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
static HRESULT WINAPI DirectMusicSegmentState8_QueryInterface(IDirectMusicSegmentState8 *iface, REFIID riid, void **ppobj)
|
|
|
|
{
|
|
|
|
IDirectMusicSegmentState8Impl *This = impl_from_IDirectMusicSegmentState8(iface);
|
|
|
|
|
|
|
|
TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj);
|
2005-01-11 17:02:21 +01:00
|
|
|
|
2014-05-04 18:35:15 +02:00
|
|
|
if (!ppobj)
|
|
|
|
return E_POINTER;
|
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
*ppobj = NULL;
|
2005-01-11 17:02:21 +01:00
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
if (IsEqualIID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualIID(riid, &IID_IDirectMusicSegmentState) ||
|
|
|
|
IsEqualIID(riid, &IID_IDirectMusicSegmentState8))
|
|
|
|
{
|
|
|
|
IDirectMusicSegmentState8_AddRef(iface);
|
|
|
|
*ppobj = &This->IDirectMusicSegmentState8_iface;
|
|
|
|
return S_OK;
|
|
|
|
}
|
2005-02-02 10:31:06 +01:00
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ppobj);
|
|
|
|
return E_NOINTERFACE;
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
static ULONG WINAPI DirectMusicSegmentState8_AddRef(IDirectMusicSegmentState8 *iface)
|
|
|
|
{
|
|
|
|
IDirectMusicSegmentState8Impl *This = impl_from_IDirectMusicSegmentState8(iface);
|
|
|
|
ULONG ref = InterlockedIncrement(&This->ref);
|
|
|
|
|
2022-02-08 23:14:49 +01:00
|
|
|
TRACE("(%p): %ld\n", This, ref);
|
2014-02-27 06:34:27 +01:00
|
|
|
|
|
|
|
DMIME_LockModule();
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI DirectMusicSegmentState8_Release(IDirectMusicSegmentState8 *iface)
|
|
|
|
{
|
|
|
|
IDirectMusicSegmentState8Impl *This = impl_from_IDirectMusicSegmentState8(iface);
|
|
|
|
ULONG ref = InterlockedDecrement(&This->ref);
|
|
|
|
|
2022-02-08 23:14:49 +01:00
|
|
|
TRACE("(%p): %ld\n", This, ref);
|
2014-02-27 06:34:27 +01:00
|
|
|
|
|
|
|
if (ref == 0)
|
|
|
|
HeapFree(GetProcessHeap(), 0, This);
|
2005-02-02 10:31:06 +01:00
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
DMIME_UnlockModule();
|
2005-02-02 10:31:06 +01:00
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
return ref;
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
static HRESULT WINAPI DirectMusicSegmentState8_GetRepeats(IDirectMusicSegmentState8 *iface, DWORD* pdwRepeats)
|
|
|
|
{
|
|
|
|
IDirectMusicSegmentState8Impl *This = impl_from_IDirectMusicSegmentState8(iface);
|
|
|
|
FIXME("(%p, %p): stub\n", This, pdwRepeats);
|
|
|
|
return S_OK;
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
static HRESULT WINAPI DirectMusicSegmentState8_GetSegment(IDirectMusicSegmentState8 *iface, IDirectMusicSegment** ppSegment)
|
|
|
|
{
|
|
|
|
IDirectMusicSegmentState8Impl *This = impl_from_IDirectMusicSegmentState8(iface);
|
|
|
|
FIXME("(%p, %p): stub\n", This, ppSegment);
|
|
|
|
return S_OK;
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
static HRESULT WINAPI DirectMusicSegmentState8_GetStartTime(IDirectMusicSegmentState8 *iface, MUSIC_TIME* pmtStart)
|
|
|
|
{
|
|
|
|
IDirectMusicSegmentState8Impl *This = impl_from_IDirectMusicSegmentState8(iface);
|
|
|
|
FIXME("(%p, %p): stub\n", This, pmtStart);
|
|
|
|
return S_OK;
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
static HRESULT WINAPI DirectMusicSegmentState8_GetSeek(IDirectMusicSegmentState8 *iface, MUSIC_TIME* pmtSeek)
|
|
|
|
{
|
|
|
|
IDirectMusicSegmentState8Impl *This = impl_from_IDirectMusicSegmentState8(iface);
|
|
|
|
FIXME("(%p, %p): stub\n", This, pmtSeek);
|
|
|
|
return S_OK;
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
static HRESULT WINAPI DirectMusicSegmentState8_GetStartPoint(IDirectMusicSegmentState8 *iface, MUSIC_TIME* pmtStart)
|
|
|
|
{
|
|
|
|
IDirectMusicSegmentState8Impl *This = impl_from_IDirectMusicSegmentState8(iface);
|
|
|
|
FIXME("(%p, %p): stub\n", This, pmtStart);
|
|
|
|
return S_OK;
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
static HRESULT WINAPI DirectMusicSegmentState8_SetTrackConfig(IDirectMusicSegmentState8 *iface, REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff) {
|
|
|
|
IDirectMusicSegmentState8Impl *This = impl_from_IDirectMusicSegmentState8(iface);
|
2022-02-08 23:14:49 +01:00
|
|
|
FIXME("(%p, %s, %ld, %ld, %ld, %ld): stub\n", This, debugstr_dmguid(rguidTrackClassID), dwGroupBits, dwIndex, dwFlagsOn, dwFlagsOff);
|
2014-02-27 06:34:27 +01:00
|
|
|
return S_OK;
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
static HRESULT WINAPI DirectMusicSegmentState8_GetObjectInPath(IDirectMusicSegmentState8 *iface, DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, DWORD dwIndex, REFGUID iidInterface, void** ppObject) {
|
|
|
|
IDirectMusicSegmentState8Impl *This = impl_from_IDirectMusicSegmentState8(iface);
|
2022-02-08 23:14:49 +01:00
|
|
|
FIXME("(%p, %ld, %ld, %ld, %s, %ld, %s, %p): stub\n", This, dwPChannel, dwStage, dwBuffer, debugstr_dmguid(guidObject), dwIndex, debugstr_dmguid(iidInterface), ppObject);
|
2014-02-27 06:34:27 +01:00
|
|
|
return S_OK;
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2014-02-27 06:34:27 +01:00
|
|
|
static const IDirectMusicSegmentState8Vtbl DirectMusicSegmentState8Vtbl = {
|
|
|
|
DirectMusicSegmentState8_QueryInterface,
|
|
|
|
DirectMusicSegmentState8_AddRef,
|
|
|
|
DirectMusicSegmentState8_Release,
|
|
|
|
DirectMusicSegmentState8_GetRepeats,
|
|
|
|
DirectMusicSegmentState8_GetSegment,
|
|
|
|
DirectMusicSegmentState8_GetStartTime,
|
|
|
|
DirectMusicSegmentState8_GetSeek,
|
|
|
|
DirectMusicSegmentState8_GetStartPoint,
|
|
|
|
DirectMusicSegmentState8_SetTrackConfig,
|
|
|
|
DirectMusicSegmentState8_GetObjectInPath
|
2003-07-22 00:10:14 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* for ClassFactory */
|
2014-02-27 06:34:27 +01:00
|
|
|
HRESULT WINAPI create_dmsegmentstate(REFIID riid, void **ret_iface)
|
2014-01-10 10:41:27 +01:00
|
|
|
{
|
2014-02-27 06:34:27 +01:00
|
|
|
IDirectMusicSegmentState8Impl* obj;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
*ret_iface = NULL;
|
|
|
|
|
|
|
|
obj = HeapAlloc (GetProcessHeap(), 0, sizeof(IDirectMusicSegmentState8Impl));
|
|
|
|
if (!obj)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
obj->IDirectMusicSegmentState8_iface.lpVtbl = &DirectMusicSegmentState8Vtbl;
|
|
|
|
obj->ref = 1;
|
|
|
|
|
|
|
|
hr = IDirectMusicSegmentState8_QueryInterface(&obj->IDirectMusicSegmentState8_iface, riid, ret_iface);
|
|
|
|
IDirectMusicSegmentState8_Release(&obj->IDirectMusicSegmentState8_iface);
|
|
|
|
return hr;
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|