Skip to content

Update Makefile #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
formatiing changes
  • Loading branch information
va7yaa committed Jan 17, 2017
commit c58720a89f33526137069eb4e81657f9faeaa769
2 changes: 1 addition & 1 deletion audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,6 @@ static int set_oss_params (int a, int fd, struct audio_s *pa)
char message[100];
int ossbuf_size_in_bytes;


err = ioctl (fd, SNDCTL_DSP_CHANNELS, &(pa->adev[a].num_channels));
if (err == -1) {
text_color_set(DW_COLOR_ERROR);
Expand Down Expand Up @@ -1249,6 +1248,7 @@ int audio_flush (int a)
}
if (k < len) {
/* presumably full but didn't block. */
dw_printf("problem\n");
usleep (10000);
}
ptr += k;
Expand Down
16 changes: 8 additions & 8 deletions audio_ptt_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ unsigned __stdcall ptt_thread (void *arg)
* Soundcard is only possibility at this time.
*/

err = waveOutOpen ( &hWaveOut, atoi( save_audio_config_p->adev[a].adevice_out ), &wf, (DWORD_PTR)NULL, 0, CALLBACK_NULL );
err = waveOutOpen (&hWaveOut, atoi( save_audio_config_p->adev[a].adevice_out ), &wf, (DWORD_PTR)NULL, 0, CALLBACK_NULL);
if (err == MMSYSERR_NOERROR) {
WAVEHDR waveHeader;
short* pnData;
Expand All @@ -103,7 +103,7 @@ unsigned __stdcall ptt_thread (void *arg)
int j;

waveHeader.dwBufferLength = save_audio_config_p->adev[a].num_channels * nSamples * sizeof( short );
waveHeader.lpData = malloc( waveHeader.dwBufferLength );
waveHeader.lpData = malloc (waveHeader.dwBufferLength);
waveHeader.dwUser = 0;
waveHeader.dwFlags = WHDR_BEGINLOOP | WHDR_ENDLOOP;
waveHeader.dwLoops = 0xFFFF;
Expand Down Expand Up @@ -140,31 +140,31 @@ unsigned __stdcall ptt_thread (void *arg)
// ptt_set on
//

waveOutWrite ( hWaveOut, &waveHeader, sizeof( WAVEHDR ) );
waveOutWrite (hWaveOut, &waveHeader, sizeof( WAVEHDR ));
}
else if (dwWait == WAIT_OBJECT_0 + 1) {
//
// ptt_set off
//

waveOutReset ( hWaveOut );
waveOutReset (hWaveOut);
}
else if (dwWait == WAIT_OBJECT_0 + 2) {
else if( dwWait == WAIT_OBJECT_0 + 2 ) {
//
// close
//

waveOutReset (hWaveOut);
waveOutUnprepareHeader (hWaveOut, &waveHeader, sizeof(WAVEHDR));
waveOutUnprepareHeader (hWaveOut, &waveHeader, sizeof( WAVEHDR ));

break;
}
}
}

waveOutClose ( hWaveOut );
waveOutClose (hWaveOut);

free( waveHeader.lpData );
free (waveHeader.lpData);
}
}

Expand Down