...
|
...
|
@@ -23,7 +23,7 @@
|
23
|
23
|
#define APP_DESCRIPTION "Small utility to transcode on the fly mp3 stream"
|
24
|
24
|
|
25
|
25
|
#define APP_USER_AGENT "mp3gw/0.0.1 (2014-05-06)"
|
26
|
|
-//~ #define APP_FAKE_USER_AGENT "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; WOW64; Trident/4.0; SLCC1)"
|
|
26
|
+//#define APP_FAKE_USER_AGENT "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; WOW64; Trident/4.0; SLCC1)"
|
27
|
27
|
#define APP_FAKE_USER_AGENT "Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130912 Firefox/17.0"
|
28
|
28
|
|
29
|
29
|
|
...
|
...
|
@@ -54,13 +54,6 @@
|
54
|
54
|
#define CLI_DEFAULT_PORT 80
|
55
|
55
|
#endif //CLI_DEFAULT_PORT
|
56
|
56
|
|
57
|
|
-//~ #define _DEBUG
|
58
|
|
-//~ #ifdef _DEBUG
|
59
|
|
- //~ #define DEBUG_PRINT(...) { fprintf( stderr, "%s:%d : ", __FILE__,__LINE__);fprintf( stderr, __VA_ARGS__ );fprintf( stderr,"\n"); }
|
60
|
|
-//~ #else
|
61
|
|
- //~ #define DEBUG_PRINT(...)
|
62
|
|
-//~ #endif //_DEBUG
|
63
|
|
-
|
64
|
57
|
#define DEBUG
|
65
|
58
|
#ifdef DEBUG
|
66
|
59
|
#define DEBUG_PRINT(...) do{ fprintf( stderr,"[DEBUG]%s:%d:%s() ",__FILE__,__LINE__,__FUNCTION__);fprintf( stderr, __VA_ARGS__ ); } while( false )
|
...
|
...
|
@@ -95,7 +88,7 @@ const int32_t MP3_OUTPUT_mode = TWOLAME_STEREO;//TWOLAME_MONO or TWOLAME_STEREO
|
95
|
88
|
//SNDFILE Constants & Definitions
|
96
|
89
|
#define WAVDUMP
|
97
|
90
|
#define MP3DUMP
|
98
|
|
-//~ #define USE_RESAMPLE
|
|
91
|
+//#define USE_RESAMPLE
|
99
|
92
|
|
100
|
93
|
#ifdef WAVDUMP
|
101
|
94
|
const char *cst_output_dump_file = "output.wav";
|
...
|
...
|
@@ -361,8 +354,6 @@ int32_t main(int32_t argc, char **argv )
|
361
|
354
|
listen(sock_srv, MAX_LISTEN);
|
362
|
355
|
|
363
|
356
|
int32_t c = sizeof(struct sockaddr_in);
|
364
|
|
- //~ while( (sock_srv_cli = accept(sock_srv, (struct sockaddr *)&local_cli_addr, (socklen_t*)&c)) )
|
365
|
|
- //~ while(1)
|
366
|
357
|
while(0 == s_exit_program)
|
367
|
358
|
{
|
368
|
359
|
sock_srv_cli = accept(sock_srv, (struct sockaddr *)&local_cli_addr, (socklen_t*)&c);
|