summaryrefslogtreecommitdiffstats
path: root/mp3lib/test2.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-05-13 02:58:57 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-05-13 02:58:57 +0000
commit6e9cbdc10448203e7c8b2de41447442fcc9f7bae (patch)
tree0ed465592509105fdbeab27fc12ddbb2e3590aa5 /mp3lib/test2.c
parenteafe5b7517bbf408ae1ffc936a3abe2313c3b334 (diff)
downloadmpv-6e9cbdc10448203e7c8b2de41447442fcc9f7bae.tar.bz2
mpv-6e9cbdc10448203e7c8b2de41447442fcc9f7bae.tar.xz
whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp3lib/test2.c')
-rw-r--r--mp3lib/test2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mp3lib/test2.c b/mp3lib/test2.c
index 0b6a7cbb25..f9bcfc073f 100644
--- a/mp3lib/test2.c
+++ b/mp3lib/test2.c
@@ -26,10 +26,10 @@ int main(int argc,char* argv[]){
int total=0;
int r;
int audio_fd;
-
+
mp3file=fopen((argc>1)?argv[1]:"test.mp3","rb");
if(!mp3file){ printf("file not found\n"); exit(1); }
-
+
GetCpuCaps(&gCpuCaps);
// MPEG Audio:
@@ -40,19 +40,19 @@ int main(int argc,char* argv[]){
#endif
MP3_samplerate=MP3_channels=0;
len=MP3_DecodeFrame(buffer,-1);
-
+
audio_fd=open("/dev/dsp", O_WRONLY);
if(audio_fd<0){ printf("Can't open audio device\n");exit(1); }
r=AFMT_S16_LE;ioctl (audio_fd, SNDCTL_DSP_SETFMT, &r);
r=MP3_channels-1;ioctl (audio_fd, SNDCTL_DSP_STEREO, &r);
r=MP3_samplerate;ioctl (audio_fd, SNDCTL_DSP_SPEED, &r);
printf("audio_setup: using %d Hz samplerate (requested: %d)\n",r,MP3_samplerate);
-
+
while(1){
int len2;
if(len==0) len=MP3_DecodeFrame(buffer,-1);
if(len<=0) break; // EOF
-
+
// play it
len2=write(audio_fd,buffer,len);
if(len2<0) break; // ERROR?
@@ -63,7 +63,7 @@ int main(int argc,char* argv[]){
putchar('!');fflush(stdout);
}
}
-
+
fclose(mp3file);
return 0;
}