1
0
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:
thor
2007-05-02 22:48:23 +00:00
parent c7df68fe55
commit 1e56b91ceb
14 changed files with 164 additions and 98 deletions

View File

@@ -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;