Sorry, the previous mail was a mistake.

I just had to remove the pause statement:-)

Linrad seems to work fine under Windows now
and it will be possible to change no of channels
and 8/16 bits for the output in the next version.

73

Leif


On Thu, 3 Aug 2006 01:35:01 +0200
Leif Asbrink <[EMAIL PROTECTED]> wrote:

> Hello All,
> 
> There are still problems with Linrad under Windows.
> The most frustrating one is that I can not find out
> how to close the output device and then open it
> again.
> 
> Currently the code (wsetad.c) is like this:
> 
> mmrs=waveOutReset(hwav_rxdaout);
> if(mmrs != MMSYSERR_NOERROR)lirerr(25344);
> for(i=0; i<NO_OF_RX_WAVEOUT; i++)
>   {
>   whdr=rxdaout_newbuf[i];
>   while( (whdr[0].dwFlags&WHDR_INQUEUE) != 0)lir_sleep(3000);
>   mmrs=waveOutUnprepareHeader(hwav_rxdaout, whdr, sizeof(WAVEHDR));
>   if(mmrs != MMSYSERR_NOERROR)lirerr(25144);
>   }
> mmrs=waveOutClose(hwav_rxdaout);
> if(mmrs != MMSYSERR_NOERROR)lirerr(25344);
> 
> From the Microsoft site I can not get any information
> that suggests something to be wrong here. The open routine
> that works fine on the initial open uses this code:
> mmrs=waveOutPause(hwav_rxdaout);
> if(mmrs != MMSYSERR_NOERROR)  lirerr(1238);
> waveout_buf=malloc(NO_OF_RX_WAVEOUT*daout_block+fmt.nBlockAlign);
> if(waveout_buf==NULL)goto wave_close;
> wave_outhdr=malloc(NO_OF_RX_WAVEOUT*sizeof(WAVEHDR));
> if(wave_outhdr==NULL)goto free_waveout;
> da_wrbuf=malloc(daout_block);
> if(da_wrbuf==NULL)goto free_outhdr;
> for(i=0; i<NO_OF_RX_WAVEOUT; i++)
>   {
>   k=(int)(waveout_buf+i*daout_block+fmt.nBlockAlign);
>   k&=(-1-fmt.nBlockAlign);
>   wave_outhdr[i].lpData=(char*)(k);
>   wave_outhdr[i].dwBufferLength=daout_block;
>   wave_outhdr[i].dwBytesRecorded=0;
>   wave_outhdr[i].dwUser=1;
>   wave_outhdr[i].dwFlags=0;
>   wave_outhdr[i].dwLoops=0;
>   wave_outhdr[i].lpNext=NULL;
>   wave_outhdr[i].reserved=0;
>   mmrs=waveOutPrepareHeader(hwav_rxdaout, &wave_outhdr[i], sizeof(WAVEHDR));
>   rxdaout_newbuf[i]=&wave_outhdr[i];
>   if(mmrs != MMSYSERR_NOERROR)goto errfree;
>   }
> 
> 
> Each system call generates MMSYSERR_NOERROR so there is no error exit.
> Nevertheless the 
> 
> #############################################################
> This message is sent to you because you are subscribed to
>   the mailing list <linrad@antennspecialisten.se>.
> To unsubscribe, E-mail to: <[EMAIL PROTECTED]>
> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]>
> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]>
> Send administrative queries to  <[EMAIL PROTECTED]>
> 

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <linrad@antennspecialisten.se>.
To unsubscribe, E-mail to: <[EMAIL PROTECTED]>
To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]>
To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]>
Send administrative queries to  <[EMAIL PROTECTED]>

Reply via email to