delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/03/10/09:08:04

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <7c5010d60803100707s2332493bu56d18efd5fd17cf8@mail.gmail.com>
Date: Mon, 10 Mar 2008 15:07:21 +0100
From: "Giovanni Maruzzelli" <gmaruzz DOT lists AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: problem with waveinopen under Vista
In-Reply-To: <7c5010d60803100548o2ab50c0bg83fc8bade769d2aa@mail.gmail.com>
MIME-Version: 1.0
References: <7c5010d60803100548o2ab50c0bg83fc8bade769d2aa AT mail DOT gmail DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hi again,

I just updated the entire installation, and the new cygwin.dll got installed.

The test program below, compiled with the new cygwin-1.5.25-11, under
Vista crashes immediately when waveInOpen is called.

If compiled with -mno-cygwin, runs fine under Vista and cygwin-1.5.25-11

Not tested under XP yet.

Ciao,

Giovanni


On Mon, Mar 10, 2008 at 1:48 PM, Giovanni Maruzzelli
<gmaruzz DOT lists AT gmail DOT com> wrote:
> Hi Cygwin developers,
>
>  I got a problem using waveInOpen under Vista:
>
>  1) As soon as waveInOpen is called, the cpu load becomes very high,
>  80% on a quad core.
>  2) To cause the high load it is not needed to use the wavein, just to open it.
>  3) Under XP, no problems.
>  4) If you compile under vista with -mno-cygwin and execute with a
>  double click on it, no problem.
>  5) If you compile using cygwin, and execute it from bash, 80% load.
>
>  See below a very simple test case.
>
>  You can compile it without cygwin and then execute it with a double click:
>  gcc -mno-cygwin -Wall waveinopen_vista.c -o waveinopen_vista -l winmm
>
>  or you can compile it with cygwin and execute it from bash:
>  gcc -Wall waveinopen_vista.c -o waveinopen_vista -l winmm
>
>  =======================================
>  #include <windows.h>
>  #include <stdio.h>
>  #include <mmsystem.h>
>
>
>  /* Handle to the WAVE In Device */
>  HWAVEIN                         WaveInHandle;
>
>  int main(int argc , char ** argv)
>  {
>  MMRESULT        err;
>  WAVEFORMATEX    waveFormat;
>
>  /* Initialize the WAVEFORMATEX */
>  waveFormat.wFormatTag = WAVE_FORMAT_PCM;
>  waveFormat.nChannels = 2;
>  waveFormat.nSamplesPerSec = 44100;
>  waveFormat.wBitsPerSample = 16;
>  waveFormat.nBlockAlign = waveFormat.nChannels *
>        (waveFormat.wBitsPerSample/8);
>  waveFormat.nAvgBytesPerSec = waveFormat.nSamplesPerSec *
>        waveFormat.nBlockAlign;
>  waveFormat.cbSize = 0;
>
>
>  /* Open the default WAVE In Device */
>
>  /* if you open it with or without a callback thread,
>   the cpu load is the same */
>  //err = waveInOpen(&WaveInHandle, WAVE_MAPPER, &waveFormat,
>  //              (DWORD)err, 0, CALLBACK_THREAD);
>  err = waveInOpen(&WaveInHandle, WAVE_MAPPER, &waveFormat,
>                0, 0, CALLBACK_NULL);
>
>  printf("\n\nciao!!!\n\n");
>  Sleep(500000000);
>  printf("\n\ngoodbye!!!\n\n");
>
>  return 0;
>  }
>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019