mirror of
http://mpg123.de/trunk/.git
synced 2025-10-25 04:37:34 +03:00
Hacking MinGW32 into cooperation, in dialog with Elia Blance.
This restores some work of Tony Million from ages ago... wrapping buffer code properly into #ifndef NOXFERMEM again (except in term.c, which is a different beast). Hack Makefile for the preprocessed .S files (mingw doesn't run cpp by itself). Got autoconf'ed x86 portaudio/mme build working for *-mingw32; Elia wants SDL ...;-) Also configure now doesn't look at OS for choosing default audio output but at the available output systems instead. Let's keep this hardcoding at a minimum. Sound playback works, control_generic not (no stdin in windows terminal?). Assembler opts work nicely (including --cpu choice). WAV writing has distortion ... twisted endianess? git-svn-id: svn://scm.orgis.org/mpg123/trunk@631 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
29
src/buffer.c
29
src/buffer.c
@@ -10,6 +10,8 @@
|
||||
- dammed night coders;-)
|
||||
*/
|
||||
|
||||
#ifndef NOXFERMEM
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -35,41 +37,42 @@ static void catch_usr1 (void)
|
||||
|
||||
extern void buffer_sig(int signal, int block);
|
||||
|
||||
void buffer_ignore_lowmem(void)
|
||||
void real_buffer_ignore_lowmem(void)
|
||||
{
|
||||
#ifndef NOXFERMEM
|
||||
if (!buffermem)
|
||||
return;
|
||||
if(buffermem->wakeme[XF_READER])
|
||||
xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_WAKEUP);
|
||||
#endif
|
||||
}
|
||||
|
||||
void buffer_end(void)
|
||||
void real_buffer_end(void)
|
||||
{
|
||||
#ifndef NOXFERMEM
|
||||
if (!buffermem)
|
||||
return;
|
||||
xfermem_putcmd(buffermem->fd[XF_WRITER], XF_CMD_TERMINATE);
|
||||
#endif
|
||||
}
|
||||
|
||||
void buffer_resync(void)
|
||||
void real_buffer_resync(void)
|
||||
{
|
||||
buffer_sig(SIGINT, TRUE);
|
||||
}
|
||||
|
||||
void buffer_reset(void)
|
||||
void real_plain_buffer_resync(void)
|
||||
{
|
||||
buffer_sig(SIGINT, FALSE);
|
||||
}
|
||||
|
||||
void real_buffer_reset(void)
|
||||
{
|
||||
buffer_sig(SIGUSR1, TRUE);
|
||||
}
|
||||
|
||||
void buffer_start(void)
|
||||
void real_buffer_start(void)
|
||||
{
|
||||
buffer_sig(SIGCONT, FALSE);
|
||||
}
|
||||
|
||||
void buffer_stop(void)
|
||||
void real_buffer_stop(void)
|
||||
{
|
||||
buffer_sig(SIGSTOP, FALSE);
|
||||
}
|
||||
@@ -78,8 +81,6 @@ extern int buffer_pid;
|
||||
|
||||
void buffer_sig(int signal, int block)
|
||||
{
|
||||
|
||||
#ifndef NOXFERMEM
|
||||
if (!buffermem)
|
||||
return;
|
||||
|
||||
@@ -90,13 +91,9 @@ void buffer_sig(int signal, int block)
|
||||
|
||||
if(xfermem_block(XF_WRITER, buffermem) != XF_CMD_WAKEUP)
|
||||
perror("Could not resync/reset buffers");
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef NOXFERMEM
|
||||
|
||||
void buffer_loop(struct audio_info_struct *ai, sigset_t *oldsigset)
|
||||
{
|
||||
int bytes;
|
||||
|
||||
Reference in New Issue
Block a user