summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/audio_out.c12
-rw-r--r--src/xine-engine/buffer.h3
-rw-r--r--src/xine-engine/buffer_types.c9
-rw-r--r--src/xine-engine/demux.c4
-rw-r--r--src/xine-engine/osd.c4
-rw-r--r--src/xine-engine/xine.c29
6 files changed, 50 insertions, 11 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 11bd7b698..53b0eccba 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -17,7 +17,7 @@
* along with self program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.c,v 1.123 2003/04/21 00:25:55 jstembridge Exp $
+ * $Id: audio_out.c,v 1.124 2003/04/22 23:30:48 tchamp Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -553,7 +553,7 @@ static void audio_filter_equalize (aos_t *this,
int index, band, channel;
int halflength, length;
int out[EQ_CHANNELS], scaledpcm[EQ_CHANNELS];
- long long l;
+ int64_t l;
int num_channels;
num_channels = mode_channels (this->input.mode);
@@ -575,11 +575,11 @@ static void audio_filter_equalize (aos_t *this,
for (band = 0; band < EQ_BANDS; band++) {
this->eq_data_history[band][channel].x[this->eq_i] = scaledpcm[channel];
- l = (long long)iir_cf[band].alpha * (long long)(this->eq_data_history[band][channel].x[this->eq_i] - this->eq_data_history[band][channel].x[this->eq_k])
- + (long long)iir_cf[band].gamma * (long long)this->eq_data_history[band][channel].y[this->eq_j]
- - (long long)iir_cf[band].beta * (long long)this->eq_data_history[band][channel].y[this->eq_k];
+ l = (int64_t)iir_cf[band].alpha * (int64_t)(this->eq_data_history[band][channel].x[this->eq_i] - this->eq_data_history[band][channel].x[this->eq_k])
+ + (int64_t)iir_cf[band].gamma * (int64_t)this->eq_data_history[band][channel].y[this->eq_j]
+ - (int64_t)iir_cf[band].beta * (int64_t)this->eq_data_history[band][channel].y[this->eq_k];
this->eq_data_history[band][channel].y[this->eq_i] = (int)(l >> FP_FRBITS);
- l = (long long)this->eq_data_history[band][channel].y[this->eq_i] * (long long)this->eq_gain[band];
+ l = (int64_t)this->eq_data_history[band][channel].y[this->eq_i] * (int64_t)this->eq_gain[band];
out[channel] += (int)(l >> FP_FRBITS);
}
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h
index 205f13b2b..7abfa9992 100644
--- a/src/xine-engine/buffer.h
+++ b/src/xine-engine/buffer.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: buffer.h,v 1.107 2003/04/16 23:05:27 heinchen Exp $
+ * $Id: buffer.h,v 1.108 2003/04/22 23:30:52 tchamp Exp $
*
*
* contents:
@@ -197,6 +197,7 @@ extern "C" {
#define BUF_AUDIO_FLAC 0x032C0000
#define BUF_AUDIO_DV 0x032D0000
#define BUF_AUDIO_WMAV 0x032E0000
+#define BUF_AUDIO_DIRECTX 0x032F0000
/* spu buffer types: */
diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c
index f144e732b..ff66dfc06 100644
--- a/src/xine-engine/buffer_types.c
+++ b/src/xine-engine/buffer_types.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: buffer_types.c,v 1.56 2003/03/23 17:12:30 holstsn Exp $
+ * $Id: buffer_types.c,v 1.57 2003/04/22 23:30:53 tchamp Exp $
*
*
* contents:
@@ -833,6 +833,13 @@ static audio_db_t audio_db[] = {
BUF_AUDIO_DV,
"DV Audio"
},
+{
+ {
+ 0
+ },
+ BUF_AUDIO_DIRECTX,
+ "Directx Audio"
+},
{ { 0 }, 0, "last entry" }
};
diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c
index 8cafe9f78..c6dcbf280 100644
--- a/src/xine-engine/demux.c
+++ b/src/xine-engine/demux.c
@@ -35,6 +35,10 @@
#include "demuxers/demux.h"
#include "buffer.h"
+#ifdef WIN32
+#include <winsock.h>
+#endif
+
/*
#define LOG
*/
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c
index 3e6cb230a..892152872 100644
--- a/src/xine-engine/osd.c
+++ b/src/xine-engine/osd.c
@@ -89,14 +89,14 @@ struct osd_font_s {
osd_font_t *next;
};
-struct osd_ft2context_s {
#ifdef HAVE_FT2
+struct osd_ft2context_s {
int useme;
FT_Library library;
FT_Face face;
int size;
-#endif
};
+#endif
/*
* open a new osd object. this will allocated an empty (all zero) drawing
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 811a53888..5bba920cd 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.c,v 1.243 2003/04/17 19:01:24 miguelfreitas Exp $
+ * $Id: xine.c,v 1.244 2003/04/22 23:30:55 tchamp Exp $
*
* top-level xine functions
*
@@ -58,6 +58,11 @@
#include "xineutils.h"
#include "compat.h"
+#ifdef WIN32
+# include <fcntl.h>
+# include <winsock.h>
+#endif /* WIN32 */
+
/*
#define LOG
*/
@@ -1084,6 +1089,11 @@ void xine_exit (xine_t *this) {
if(this->config)
this->config->dispose(this->config);
+#if defined(WIN32)
+ WSACleanup();
+#endif
+
+
pthread_mutex_destroy(&this->streams_lock);
free (this);
@@ -1094,6 +1104,11 @@ xine_t *xine_new (void) {
xine_t *this;
int i;
+#ifdef WIN32
+ WSADATA Data;
+ int i_err;
+#endif /* WIN32 */
+
this = xine_xmalloc (sizeof (xine_t));
if (!this) {
printf ("xine: failed to malloc xine_t\n");
@@ -1120,7 +1135,19 @@ xine_t *xine_new (void) {
for (i = 0; i < XINE_LOG_NUM; i++)
this->log_buffers[i] = new_scratch_buffer (25);
+
+#ifdef WIN32
+ /* WinSock Library Init. */
+ i_err = WSAStartup( MAKEWORD( 1, 1 ), &Data );
+
+ if( i_err )
+ {
+ fprintf( stderr, "error: can't initiate WinSocks, error %i\n", i_err );
+ }
+
+#endif /* WIN32 */
+
/*
* streams_lock
*/