winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1207 discussions
Start a n
N
ew thread
Alexandre Julliard : wrc: Include unistd.h before the Windows headers.
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: wine Branch: master Commit: da3ee6650539fa89ea19cf4a509878fcafa82192 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da3ee6650539fa89ea19cf4a5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 6 16:18:04 2009 +0200 wrc: Include unistd.h before the Windows headers. --- tools/wrc/parser.l | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l index 3ea04de..2cb7937 100644 --- a/tools/wrc/parser.l +++ b/tools/wrc/parser.l @@ -106,7 +106,9 @@ cident [a-zA-Z_][0-9a-zA-Z_]* #include <errno.h> #include <limits.h> -#ifndef HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#else #define YY_NO_UNISTD_H #endif
1
0
0
0
Paul Vriens : user32/tests: Fix some test failures with 9x/Me on VMware.
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: wine Branch: master Commit: 7be2f6d985ab2488d38075d504b92bcc8ca235d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7be2f6d985ab2488d38075d50…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Tue Oct 6 13:35:56 2009 +0200 user32/tests: Fix some test failures with 9x/Me on VMware. --- dlls/user32/tests/win.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 2a62400..63f25bc 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -3242,6 +3242,7 @@ static void test_scrollwindow( HWND hwnd) rc2 = rc; rc2.top = ( rc2.top + rc2.bottom) / 2; ScrollWindowEx( hwnd, 0, - rc2.top, &rc2, NULL, NULL, NULL, SW_ERASE); + flush_events(FALSE); /* expected: black should have scrolled to the upper half */ colr = GetPixel( hdc, (rc2.left+rc2.right)/ 2, rc2.bottom / 4 ); ok ( colr == 0, "pixel should be black, color is %08x\n", colr); @@ -3261,6 +3262,7 @@ static void test_scrollwindow( HWND hwnd) rc3.left = rc3.right / 4; rc3.right -= rc3.right / 4; ScrollWindowEx( hwnd, 0, - rc2.top, &rc2, &rc3, NULL, NULL, SW_ERASE); + flush_events(FALSE); /* expected: black should have scrolled to the upper half */ colr = GetPixel( hdc, (rc2.left+rc2.right)/ 2, rc2.bottom / 4 ); ok ( colr == 0, "pixel should be black, color is %08x\n", colr);
1
0
0
0
Vladimir Pankratov : jscript: Update Russian translation.
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: wine Branch: master Commit: 910e3baee3ae0c81c231c39fa0c71ddee9bed6ca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=910e3baee3ae0c81c231c39fa…
Author: Vladimir Pankratov <scriptkid(a)mail.ru> Date: Tue Oct 6 16:58:33 2009 +0500 jscript: Update Russian translation. --- dlls/jscript/jscript_Ru.rc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/jscript/jscript_Ru.rc b/dlls/jscript/jscript_Ru.rc index a2bf3ce..95745bd 100644 --- a/dlls/jscript/jscript_Ru.rc +++ b/dlls/jscript/jscript_Ru.rc @@ -27,6 +27,7 @@ STRINGTABLE DISCARDABLE { IDS_TO_PRIMITIVE "Ошибка конвертирования объекта в примитивный тип" IDS_INVALID_CALL_ARG "Неверный вызов процедуры или аргумент" + IDS_CREATE_OBJ_ERROR "Сервер автоматизации не может создать объект" IDS_NO_PROPERTY "Объект не поддерживает это свойство или метод" IDS_ARG_NOT_OPT "Отсутствует обязательный аргумент" IDS_SYNTAX_ERROR "Синтаксическая ошибка" @@ -41,5 +42,8 @@ STRINGTABLE DISCARDABLE IDS_ILLEGAL_ASSIGN "Неверное присваивание" IDS_UNDEFINED "'|' не определён" IDS_NOT_BOOL "Ожидается объект типа 'bool'" + IDS_JSCRIPT_EXPECTED "Ожидается объект типа 'JScript'" + IDS_REGEXP_SYNTAX_ERROR "Синтаксическая ошибка в регулярном выражении" IDS_INVALID_LENGTH "Длиной массива должно быть конечное положительное число" + IDS_ARRAY_EXPECTED "Ожидается объект типа 'Array'" }
1
0
0
0
Jörg Höhle : dsound: Correct deallocations when DuplicateSoundBuffer fails.
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: wine Branch: master Commit: de133ae00ebee624ac9c8e6d36fc8903d346df80 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=de133ae00ebee624ac9c8e6d3…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Sun Oct 4 09:13:53 2009 +0200 dsound: Correct deallocations when DuplicateSoundBuffer fails. --- dlls/dsound/buffer.c | 26 ++++++++++++-------------- 1 files changed, 12 insertions(+), 14 deletions(-) diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c index 4b486fd..2a25d50 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c @@ -1177,15 +1177,20 @@ HRESULT IDirectSoundBufferImpl_Duplicate( HRESULT hres = DS_OK; TRACE("(%p,%p,%p)\n", device, pdsb, pdsb); - dsb = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(*dsb)); - + dsb = HeapAlloc(GetProcessHeap(),0,sizeof(*dsb)); if (dsb == NULL) { WARN("out of memory\n"); *ppdsb = NULL; return DSERR_OUTOFMEMORY; } + CopyMemory(dsb, pdsb, sizeof(*dsb)); - CopyMemory(dsb, pdsb, sizeof(IDirectSoundBufferImpl)); + dsb->pwfx = DSOUND_CopyFormat(pdsb->pwfx); + if (dsb->pwfx == NULL) { + HeapFree(GetProcessHeap(),0,dsb); + *ppdsb = NULL; + return DSERR_OUTOFMEMORY; + } if (pdsb->hwbuf) { TRACE("duplicating hardware buffer\n"); @@ -1194,6 +1199,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate( (LPVOID *)&dsb->hwbuf); if (FAILED(hres)) { WARN("IDsDriver_DuplicateSoundBuffer failed (%08x)\n", hres); + HeapFree(GetProcessHeap(),0,dsb->pwfx); HeapFree(GetProcessHeap(),0,dsb); *ppdsb = NULL; return hres; @@ -1213,15 +1219,6 @@ HRESULT IDirectSoundBufferImpl_Duplicate( DSOUND_RecalcFormat(dsb); DSOUND_MixToTemporary(dsb, 0, dsb->buflen, FALSE); - dsb->pwfx = DSOUND_CopyFormat(pdsb->pwfx); - if (dsb->pwfx == NULL) { - HeapFree(GetProcessHeap(),0,dsb->tmp_buffer); - HeapFree(GetProcessHeap(),0,dsb->buffer); - HeapFree(GetProcessHeap(),0,dsb); - *ppdsb = NULL; - return DSERR_OUTOFMEMORY; - } - RtlInitializeResource(&dsb->lock); /* register buffer */ @@ -1229,10 +1226,11 @@ HRESULT IDirectSoundBufferImpl_Duplicate( if (hres != DS_OK) { RtlDeleteResource(&dsb->lock); HeapFree(GetProcessHeap(),0,dsb->tmp_buffer); - HeapFree(GetProcessHeap(),0,dsb->buffer); + list_remove(&dsb->entry); + dsb->buffer->ref--; HeapFree(GetProcessHeap(),0,dsb->pwfx); HeapFree(GetProcessHeap(),0,dsb); - *ppdsb = 0; + dsb = NULL; } *ppdsb = dsb;
1
0
0
0
Jörg Höhle : dsound: Enforce invariant about BlockAlign and nAvgBytesPerSec.
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: wine Branch: master Commit: dc3471ca0e7c2209ecf9758359cc62f9d958bf2c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc3471ca0e7c2209ecf975835…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Sun Oct 4 08:05:20 2009 +0200 dsound: Enforce invariant about BlockAlign and nAvgBytesPerSec. --- dlls/dsound/buffer.c | 32 ++++++------------------- dlls/dsound/capture.c | 11 +++----- dlls/dsound/dsound_private.h | 1 + dlls/dsound/primary.c | 53 +++++++++++++++++++++++++++++++++-------- 4 files changed, 55 insertions(+), 42 deletions(-) diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c index 2d64341..4b486fd 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c @@ -957,7 +957,7 @@ HRESULT IDirectSoundBufferImpl_Create( LPWAVEFORMATEX wfex = dsbd->lpwfxFormat; HRESULT err = DS_OK; DWORD capf = 0; - int use_hw, alloc_size, cp_size; + int use_hw; TRACE("(%p,%p,%p)\n",device,pdsb,dsbd); if (dsbd->dwBufferBytes < DSBSIZE_MIN || dsbd->dwBufferBytes > DSBSIZE_MAX) { @@ -985,23 +985,13 @@ HRESULT IDirectSoundBufferImpl_Create( /* size depends on version */ CopyMemory(&dsb->dsbd, dsbd, dsbd->dwSize); - /* variable sized struct so calculate size based on format */ - if (wfex->wFormatTag == WAVE_FORMAT_PCM) { - alloc_size = sizeof(WAVEFORMATEX); - cp_size = sizeof(PCMWAVEFORMAT); - } else - alloc_size = cp_size = sizeof(WAVEFORMATEX) + wfex->cbSize; - - dsb->pwfx = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,alloc_size); + dsb->pwfx = DSOUND_CopyFormat(wfex); if (dsb->pwfx == NULL) { - WARN("out of memory\n"); HeapFree(GetProcessHeap(),0,dsb); *pdsb = NULL; return DSERR_OUTOFMEMORY; } - CopyMemory(dsb->pwfx, wfex, cp_size); - if (dsbd->dwBufferBytes % dsbd->lpwfxFormat->nBlockAlign) dsb->buflen = dsbd->dwBufferBytes + (dsbd->lpwfxFormat->nBlockAlign - @@ -1185,7 +1175,6 @@ HRESULT IDirectSoundBufferImpl_Duplicate( { IDirectSoundBufferImpl *dsb; HRESULT hres = DS_OK; - int size; TRACE("(%p,%p,%p)\n", device, pdsb, pdsb); dsb = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(*dsb)); @@ -1224,20 +1213,15 @@ HRESULT IDirectSoundBufferImpl_Duplicate( DSOUND_RecalcFormat(dsb); DSOUND_MixToTemporary(dsb, 0, dsb->buflen, FALSE); - /* variable sized struct so calculate size based on format */ - size = sizeof(WAVEFORMATEX) + pdsb->pwfx->cbSize; - - dsb->pwfx = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,size); + dsb->pwfx = DSOUND_CopyFormat(pdsb->pwfx); if (dsb->pwfx == NULL) { - WARN("out of memory\n"); - HeapFree(GetProcessHeap(),0,dsb->buffer); - HeapFree(GetProcessHeap(),0,dsb); - *ppdsb = NULL; - return DSERR_OUTOFMEMORY; + HeapFree(GetProcessHeap(),0,dsb->tmp_buffer); + HeapFree(GetProcessHeap(),0,dsb->buffer); + HeapFree(GetProcessHeap(),0,dsb); + *ppdsb = NULL; + return DSERR_OUTOFMEMORY; } - CopyMemory(dsb->pwfx, pdsb->pwfx, size); - RtlInitializeResource(&dsb->lock); /* register buffer */ diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index 0e75dd7..95b38af 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -1365,13 +1365,10 @@ HRESULT IDirectSoundCaptureBufferImpl_Create( wfex->nAvgBytesPerSec, wfex->nBlockAlign, wfex->wBitsPerSample, wfex->cbSize); - if (wfex->wFormatTag == WAVE_FORMAT_PCM) { - device->pwfx = HeapAlloc(GetProcessHeap(),0,sizeof(WAVEFORMATEX)); - CopyMemory(device->pwfx, wfex, sizeof(PCMWAVEFORMAT)); - device->pwfx->cbSize = 0; - } else { - device->pwfx = HeapAlloc(GetProcessHeap(),0,sizeof(WAVEFORMATEX)+wfex->cbSize); - CopyMemory(device->pwfx, wfex, sizeof(WAVEFORMATEX)+wfex->cbSize); + device->pwfx = DSOUND_CopyFormat(wfex); + if ( device->pwfx == NULL ) { + *ppobj = NULL; + return DSERR_OUTOFMEMORY; } *ppobj = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY, diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h index 221433f..e028358 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h @@ -437,6 +437,7 @@ HRESULT DSOUND_PrimaryDestroy(DirectSoundDevice *device); HRESULT DSOUND_PrimaryPlay(DirectSoundDevice *device); HRESULT DSOUND_PrimaryStop(DirectSoundDevice *device); HRESULT DSOUND_PrimaryGetPosition(DirectSoundDevice *device, LPDWORD playpos, LPDWORD writepos); +LPWAVEFORMATEX DSOUND_CopyFormat(LPCWAVEFORMATEX wfex); HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex, BOOL forced); HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave); diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index a57a5af..6b3ca35 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -17,6 +17,10 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * TODO: + * When PrimarySetFormat (via ReopenDevice or PrimaryOpen) fails, + * it leaves dsound in unusable (not really open) state. */ #include <stdarg.h> @@ -437,11 +441,36 @@ HRESULT DSOUND_PrimaryGetPosition(DirectSoundDevice *device, LPDWORD playpos, LP return DS_OK; } +LPWAVEFORMATEX DSOUND_CopyFormat(LPCWAVEFORMATEX wfex) +{ + DWORD size = wfex->wFormatTag == WAVE_FORMAT_PCM ? + sizeof(WAVEFORMATEX) : sizeof(WAVEFORMATEX) + wfex->cbSize; + LPWAVEFORMATEX pwfx = HeapAlloc(GetProcessHeap(),0,size); + if (pwfx == NULL) { + WARN("out of memory\n"); + } else if (wfex->wFormatTag != WAVE_FORMAT_PCM) { + CopyMemory(pwfx, wfex, size); + } else { + CopyMemory(pwfx, wfex, sizeof(PCMWAVEFORMAT)); + pwfx->cbSize=0; + if (pwfx->nBlockAlign != pwfx->nChannels * pwfx->wBitsPerSample/8) { + WARN("Fixing bad nBlockAlign (%u)\n", pwfx->nBlockAlign); + pwfx->nBlockAlign = pwfx->nChannels * pwfx->wBitsPerSample/8; + } + if (pwfx->nAvgBytesPerSec != pwfx->nSamplesPerSec * pwfx->nBlockAlign) { + WARN("Fixing bad nAvgBytesPerSec (%u)\n", pwfx->nAvgBytesPerSec); + pwfx->nAvgBytesPerSec = pwfx->nSamplesPerSec * pwfx->nBlockAlign; + } + } + return pwfx; +} + HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex, BOOL forced) { HRESULT err = DSERR_BUFFERLOST; - int i, alloc_size, cp_size; + int i; DWORD nSamplesPerSec, bpp, chans; + LPWAVEFORMATEX oldpwfx; TRACE("(%p,%p)\n", device, wfex); if (device->priolevel == DSSCL_NORMAL) { @@ -464,19 +493,19 @@ HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex, RtlAcquireResourceExclusive(&(device->buffer_list_lock), TRUE); EnterCriticalSection(&(device->mixlock)); - if (wfex->wFormatTag == WAVE_FORMAT_PCM) { - alloc_size = sizeof(WAVEFORMATEX); - cp_size = sizeof(PCMWAVEFORMAT); - } else - alloc_size = cp_size = sizeof(WAVEFORMATEX) + wfex->cbSize; - - device->pwfx = HeapReAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,device->pwfx,alloc_size); - nSamplesPerSec = device->pwfx->nSamplesPerSec; bpp = device->pwfx->wBitsPerSample; chans = device->pwfx->nChannels; - CopyMemory(device->pwfx, wfex, cp_size); + oldpwfx = device->pwfx; + device->pwfx = DSOUND_CopyFormat(wfex); + if (device->pwfx == NULL) { + device->pwfx = oldpwfx; + err = DSERR_OUTOFMEMORY; + goto done; + } + /* TODO: on failure below (bad format?), reinstall oldpwfx */ + HeapFree(GetProcessHeap(), 0, oldpwfx); if (!(device->drvdesc.dwFlags & DSDDESC_DOMMSYSTEMSETFORMAT) && device->hwbuf) { err = IDsDriverBuffer_SetFormat(device->hwbuf, device->pwfx); @@ -484,8 +513,10 @@ HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex, /* On bad format, try to re-create, big chance it will work then, only do this if we <HAVE> to */ if (forced && (device->pwfx->nSamplesPerSec/100 != wfex->nSamplesPerSec/100 || err == DSERR_BADFORMAT)) { + DWORD cp_size = wfex->wFormatTag == WAVE_FORMAT_PCM ? + sizeof(PCMWAVEFORMAT) : sizeof(WAVEFORMATEX) + wfex->cbSize; err = DSERR_BUFFERLOST; - CopyMemory(device->pwfx, wfex, cp_size); + CopyMemory(device->pwfx, wfex, cp_size); } if (err != DSERR_BUFFERLOST && FAILED(err)) {
1
0
0
0
Jörg Höhle : winmm/tests: Correct (IMA)ADPCM test .
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: wine Branch: master Commit: ad75d9a21722a9516b50868b1ec18f0a6e74f508 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ad75d9a21722a9516b50868b1…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Tue Oct 6 06:37:06 2009 +0200 winmm/tests: Correct (IMA)ADPCM test. --- dlls/winmm/tests/wave.c | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c index 97544c0..8a9caf2 100644 --- a/dlls/winmm/tests/wave.c +++ b/dlls/winmm/tests/wave.c @@ -825,6 +825,7 @@ static void wave_out_test_device(UINT_PTR device) WAVEOUTCAPSW capsW; WAVEFORMATEX format, oformat; WAVEFORMATEXTENSIBLE wfex; + IMAADPCMWAVEFORMAT wfa; HWAVEOUT wout; MMRESULT rc; UINT f; @@ -1159,7 +1160,6 @@ static void wave_out_test_device(UINT_PTR device) format.nBlockAlign=format.nChannels*format.wBitsPerSample/8; format.nAvgBytesPerSec=format.nSamplesPerSec*format.nBlockAlign; format.cbSize=0; - oformat=format; rc=waveOutOpen(&wout,device,&format,0,0,CALLBACK_NULL|WAVE_FORMAT_DIRECT); ok(rc==MMSYSERR_NOERROR ||rc==WAVERR_BADFORMAT || rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM, @@ -1176,28 +1176,30 @@ static void wave_out_test_device(UINT_PTR device) trace("waveOutOpen(%s): WAVE_FORMAT_MULAW not supported\n", dev_name(device)); - format.wFormatTag=WAVE_FORMAT_ADPCM; - format.nChannels=2; - format.wBitsPerSample=4; - format.nSamplesPerSec=22050; - format.nBlockAlign=format.nChannels*format.wBitsPerSample/8; - format.nAvgBytesPerSec=format.nSamplesPerSec*format.nBlockAlign; - format.cbSize=0; - oformat=format; - rc=waveOutOpen(&wout,device,&format,0,0,CALLBACK_NULL|WAVE_FORMAT_DIRECT); + wfa.wfx.wFormatTag=WAVE_FORMAT_IMA_ADPCM; + wfa.wfx.nChannels=1; + wfa.wfx.nSamplesPerSec=11025; + wfa.wfx.nAvgBytesPerSec=5588; + wfa.wfx.nBlockAlign=256; + wfa.wfx.wBitsPerSample=4; /* see imaadp32.c */ + wfa.wfx.cbSize=2; + wfa.wSamplesPerBlock=505; + rc=waveOutOpen(&wout,device,&wfa.wfx,0,0,CALLBACK_NULL|WAVE_FORMAT_DIRECT); ok(rc==MMSYSERR_NOERROR ||rc==WAVERR_BADFORMAT || rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM, "waveOutOpen(%s): returned %s\n",dev_name(device),wave_out_error(rc)); if (rc==MMSYSERR_NOERROR) { waveOutClose(wout); - wave_out_test_deviceOut(device,1.0,1,0,&format,0,CALLBACK_EVENT, + /* TODO: teach wave_generate_* ADPCM + wave_out_test_deviceOut(device,1.0,1,0,&wfa.wfx,0,CALLBACK_EVENT, &capsA,winetest_interactive,TRUE,FALSE); - wave_out_test_deviceOut(device,1.0,10,0,&format,0,CALLBACK_EVENT, + wave_out_test_deviceOut(device,1.0,10,0,&wfa.wfx,0,CALLBACK_EVENT, &capsA,winetest_interactive,TRUE,FALSE); - wave_out_test_deviceOut(device,1.0,5,1,&format,0,CALLBACK_EVENT, + wave_out_test_deviceOut(device,1.0,5,1,&wfa.wfx,0,CALLBACK_EVENT, &capsA,winetest_interactive,TRUE,FALSE); + */ } else - trace("waveOutOpen(%s): WAVE_FORMAT_ADPCM not supported\n", + trace("waveOutOpen(%s): WAVE_FORMAT_IMA_ADPCM not supported\n", dev_name(device)); /* test if WAVEFORMATEXTENSIBLE supported */
1
0
0
0
Piotr Caban : jscript: Added some missing functions stubs.
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: wine Branch: master Commit: 4781e055918933bc6ced399556c471a5e6a78abc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4781e055918933bc6ced39955…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Oct 6 13:11:25 2009 +0200 jscript: Added some missing functions stubs. --- dlls/jscript/date.c | 9 +++++++++ dlls/jscript/global.c | 27 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-) diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index 213d994..c753587 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -52,6 +52,7 @@ static const WCHAR propertyIsEnumerableW[] = static const WCHAR isPrototypeOfW[] = {'i','s','P','r','o','t','o','t','y','p','e','O','f',0}; static const WCHAR valueOfW[] = {'v','a','l','u','e','O','f',0}; static const WCHAR toUTCStringW[] = {'t','o','U','T','C','S','t','r','i','n','g',0}; +static const WCHAR toGMTStringW[] = {'t','o','G','M','T','S','t','r','i','n','g',0}; static const WCHAR toDateStringW[] = {'t','o','D','a','t','e','S','t','r','i','n','g',0}; static const WCHAR toTimeStringW[] = {'t','o','T','i','m','e','S','t','r','i','n','g',0}; static const WCHAR toLocaleDateStringW[] = {'t','o','L','o','c','a','l','e','D','a','t','e','S','t','r','i','n','g',0}; @@ -780,6 +781,13 @@ static HRESULT Date_toUTCString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, return S_OK; } +static HRESULT Date_toGMTString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, + VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller) +{ + FIXME("\n"); + return E_NOTIMPL; +} + /* ECMA-262 3rd Edition 15.9.5.3 */ static HRESULT dateobj_to_date_string(DateInstance *date, VARIANT *retv) { @@ -2062,6 +2070,7 @@ static const builtin_prop_t Date_props[] = { {setUTCMonthW, Date_setUTCMonth, PROPF_METHOD|2}, {setUTCSecondsW, Date_setUTCSeconds, PROPF_METHOD|2}, {toDateStringW, Date_toDateString, PROPF_METHOD}, + {toGMTStringW, Date_toGMTString, PROPF_METHOD}, {toLocaleDateStringW, Date_toLocaleDateString, PROPF_METHOD}, {toLocaleStringW, Date_toLocaleString, PROPF_METHOD}, {toLocaleTimeStringW, Date_toLocaleTimeString, PROPF_METHOD}, diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 366d738..5fd8114 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -69,6 +69,9 @@ static const WCHAR ScriptEngineBuildVersionW[] = static const WCHAR CollectGarbageW[] = {'C','o','l','l','e','c','t','G','a','r','b','a','g','e',0}; static const WCHAR MathW[] = {'M','a','t','h',0}; static const WCHAR encodeURIW[] = {'e','n','c','o','d','e','U','R','I',0}; +static const WCHAR decodeURIW[] = {'d','e','c','o','d','e','U','R','I',0}; +static const WCHAR encodeURIComponentW[] = {'e','n','c','o','d','e','U','R','I','C','o','m','p','o','n','e','n','t',0}; +static const WCHAR decodeURIComponentW[] = {'d','e','c','o','d','e','U','R','I','C','o','m','p','o','n','e','n','t',0}; static const WCHAR undefinedW[] = {'u','n','d','e','f','i','n','e','d',0}; @@ -834,6 +837,27 @@ static HRESULT JSGlobal_encodeURI(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags return S_OK; } +static HRESULT JSGlobal_decodeURI(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, + VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT JSGlobal_encodeURIComponent(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, + VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) +{ + FIXME("\n"); + return E_NOTIMPL; +} + +static HRESULT JSGlobal_decodeURIComponent(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, + VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) +{ + FIXME("\n"); + return E_NOTIMPL; +} + static const builtin_prop_t JSGlobal_props[] = { {ActiveXObjectW, JSGlobal_ActiveXObject, PROPF_CONSTR}, {ArrayW, JSGlobal_Array, PROPF_CONSTR}, @@ -862,7 +886,10 @@ static const builtin_prop_t JSGlobal_props[] = { {TypeErrorW, JSGlobal_TypeError, PROPF_CONSTR}, {URIErrorW, JSGlobal_URIError, PROPF_CONSTR}, {VBArrayW, JSGlobal_VBArray, PROPF_METHOD}, + {decodeURIW, JSGlobal_decodeURI, PROPF_METHOD}, + {decodeURIComponentW, JSGlobal_decodeURIComponent, PROPF_METHOD}, {encodeURIW, JSGlobal_encodeURI, PROPF_METHOD}, + {encodeURIComponentW, JSGlobal_encodeURIComponent, PROPF_METHOD}, {escapeW, JSGlobal_escape, PROPF_METHOD}, {evalW, JSGlobal_eval, PROPF_METHOD|1}, {isFiniteW, JSGlobal_isFinite, PROPF_METHOD},
1
0
0
0
Piotr Caban : jscript: Added Global.escape() implementation.
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: wine Branch: master Commit: de0a875146932f109ab170f177c808b45f732fd5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=de0a875146932f109ab170f17…
Author: Piotr Caban <piotr.caban(a)gmail.com> Date: Tue Oct 6 13:11:18 2009 +0200 jscript: Added Global.escape() implementation. --- dlls/jscript/global.c | 68 +++++++++++++++++++++++++++++++++++++++++++- dlls/jscript/tests/api.js | 13 ++++++++ 2 files changed, 79 insertions(+), 2 deletions(-) diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index bc39940..366d738 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -296,8 +296,72 @@ static HRESULT JSGlobal_Enumerator(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag static HRESULT JSGlobal_escape(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + BSTR ret, str; + const WCHAR *ptr; + DWORD len = 0, i, size; + char buf[4]; + HRESULT hres; + + TRACE("\n"); + + if(!arg_cnt(dp)) { + if(retv) { + ret = SysAllocString(undefinedW); + if(!ret) + return E_OUTOFMEMORY; + + V_VT(retv) = VT_BSTR; + V_BSTR(retv) = ret; + } + + return S_OK; + } + + hres = to_string(ctx, get_arg(dp, 0), ei, &str); + if(FAILED(hres)) + return hres; + + for(ptr=str; *ptr; ptr++) { + if(isalnumW(*ptr) || *ptr=='*' || *ptr=='@' || *ptr=='-' || *ptr=='_' + || *ptr=='+' || *ptr=='.' || *ptr=='/') + len++; + else { + size = WideCharToMultiByte(CP_UTF8, 0, ptr, 1, NULL, 0, NULL, NULL)*3; + if(!size) { + FIXME("throw Error\n"); + return E_FAIL; + } + len += size; + } + } + + ret = SysAllocStringLen(NULL, len); + if(!ret) + return E_OUTOFMEMORY; + + len = 0; + for(ptr=str; *ptr; ptr++) { + if(isalnumW(*ptr) || *ptr=='*' || *ptr=='@' || *ptr=='-' || *ptr=='_' + || *ptr=='+' || *ptr=='.' || *ptr=='/') + ret[len++] = *ptr; + else { + size = WideCharToMultiByte(CP_UTF8, 0, ptr, 1, buf, sizeof(buf), NULL, NULL); + for(i=0; i<size; i++) { + ret[len++] = '%'; + ret[len++] = int_to_char(buf[i] >> 4); + ret[len++] = int_to_char(buf[i] & 0xf); + } + } + } + + if(retv) { + V_VT(retv) = VT_BSTR; + V_BSTR(retv) = ret; + } + else + SysFreeString(ret); + + return S_OK; } /* ECMA-262 3rd Edition 15.1.2.1 */ diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index ae118c2..268820c 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -58,6 +58,15 @@ ok(tmp === "undefined", "encodeURI() = " + tmp); tmp = encodeURI("abc", "test"); ok(tmp === "abc", "encodeURI('abc') = " + tmp); +tmp = escape("abc"); +ok(tmp === "abc", "escape('abc') = " + tmp); +tmp = escape(""); +ok(tmp === "", "escape('') = " + tmp); +tmp = escape("a1b c!d+e(a)*-_+./,"); +ok(tmp === "a1b%20c%21d+e(a)*-_+./%2C", "escape('a1b c!d+e(a)*-_+./,') = " + tmp); +tmp = escape(); +ok(tmp === "undefined", "escape() = " + tmp); + tmp = unescape("abc"); ok(tmp === "abc", "unescape('abc') = " + tmp); tmp = unescape(""); @@ -69,6 +78,10 @@ ok(tmp === "undefined", "unescape() = " + tmp); tmp = unescape("%54%65s%u0074"); ok(tmp === "Test", "unescape('%54%65s%u0074') = " + tmp); +tmp = "aA1~`!@#$%^&*()_+=-][{}';:/.,<>?\|"; +ok(escape(tmp) === "aA1%7E%60%21(a)%23%24%25%5E%26*%28%29_+%3D-%5D%5B%7B%7D%27%3B%3A/.%2C%3C%3E%3F%7C", "escape('" + tmp + "') = " + escape(tmp)); +ok(unescape(escape(tmp)) === tmp, "unescape(escape('" + tmp + "')) = " + unescape(escape(tmp))); + tmp = "" + new Object(); ok(tmp === "[object Object]", "'' + new Object() = " + tmp); (tmp = new Array).f = Object.prototype.toString;
1
0
0
0
Andrey Turkin : ntdll: Add stub for NtSetInformationThread( ThreadHideFromDebugger).
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: wine Branch: master Commit: be910d973a432495a8372476f3c9a5547feb8602 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=be910d973a432495a8372476f…
Author: Andrey Turkin <andrey.turkin(a)gmail.com> Date: Tue Oct 6 13:34:48 2009 +0400 ntdll: Add stub for NtSetInformationThread(ThreadHideFromDebugger). --- dlls/ntdll/thread.c | 4 ++++ include/winternl.h | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index dab1c1d..30a299d 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -1227,6 +1227,10 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class, SERVER_END_REQ; } return status; + case ThreadHideFromDebugger: + /* pretend the call succeeded to satisfy some code protectors */ + return STATUS_SUCCESS; + case ThreadBasicInformation: case ThreadTimes: case ThreadPriority: diff --git a/include/winternl.h b/include/winternl.h index d35adea..a6fea7d 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -760,6 +760,7 @@ typedef enum _THREADINFOCLASS { ThreadPriorityBoost, ThreadSetTlsArrayAddress, ThreadIsIoPending, + ThreadHideFromDebugger, MaxThreadInfoClass } THREADINFOCLASS;
1
0
0
0
Andrey Turkin : ntdll: Handle invalid pointers in NtQueryInformationProcess (ProcessDebugObjectHandle).
by Alexandre Julliard
06 Oct '09
06 Oct '09
Module: wine Branch: master Commit: f2432a8bc2dddaa34cfca0abbaf8b0d1ac19b44b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f2432a8bc2dddaa34cfca0abb…
Author: Andrey Turkin <andrey.turkin(a)gmail.com> Date: Tue Oct 6 13:34:21 2009 +0400 ntdll: Handle invalid pointers in NtQueryInformationProcess(ProcessDebugObjectHandle). --- dlls/ntdll/process.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c index cae3f79..ba51df5 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c @@ -304,7 +304,14 @@ NTSTATUS WINAPI NtQueryInformationProcess( * set it to 0 aka "no debugger" to satisfy copy protections */ len = sizeof(HANDLE); if (ProcessInformationLength == len) - memset(ProcessInformation, 0, ProcessInformationLength); + { + if (!ProcessInformation) + ret = STATUS_ACCESS_VIOLATION; + else if (!ProcessHandle) + ret = STATUS_INVALID_HANDLE; + else + memset(ProcessInformation, 0, ProcessInformationLength); + } else ret = STATUS_INFO_LENGTH_MISMATCH; break;
1
0
0
0
← Newer
1
...
94
95
96
97
98
99
100
...
121
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Results per page:
10
25
50
100
200