Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6300 → Rev 6301

/contrib/media/fplay/audio.c
25,12 → 25,11
 
static SNDBUF hBuff;
 
static int snd_format;
int sample_rate;
 
static uint32_t samples_written = 0;
 
int init_audio(int format)
int init_audio(vst_t* vst)
{
int err;
int version =-1;
49,10 → 48,8
goto exit_whith_error;
}
 
snd_format = format;
create_thread(audio_thread, vst, 32768);
 
create_thread(audio_thread, 0, 163840);
 
return 1;
 
exit_whith_error:
252,7 → 249,7
char *errstr;
int active;
 
if((err = CreateBuffer(snd_format|PCM_RING,0, &hBuff)) != 0)
if((err = CreateBuffer(vst->snd_format|PCM_RING,0, &hBuff)) != 0)
{
errstr = "Cannot create sound buffer\n\r";
goto exit_whith_error;
/contrib/media/fplay/fplay.c
151,9 → 151,9
 
sample_rate = vst.aCtx->sample_rate;
 
fmt = test_wav(&whdr);
vst.snd_format = test_wav(&whdr);
 
if( init_audio(fmt) )
if( init_audio(&vst) )
{
decoder_buffer = (uint8_t*)av_mallocz(192000*2+64);
if( decoder_buffer != NULL )
347,7 → 347,7
rewind_pos, INT64_MAX, 0);
 
decoder_state = STOP;
break;
continue;
 
case REWIND:
while(sound_state != STOP)
376,7 → 376,7
(double)rewind_pos / AV_TIME_BASE);
}
decoder_state = PREPARE;
break;
continue;
}
};
};
/contrib/media/fplay/fplay.h
152,12 → 152,13
struct list_head output_list;
 
struct decoder *decoder;
int snd_format;
volatile int frames_count;
int has_sound:1;
int audio_timer_valid:1;
int blit_bitmap:1; /* hardware RGBA blitter */
int blit_texture:1; /* hardware RGBA blit and scale */
int blit_planar:1; /* hardbare YUV blit and scale */
unsigned int has_sound:1;
unsigned int audio_timer_valid:1;
unsigned int blit_bitmap:1; /* hardware RGBA blitter */
unsigned int blit_texture:1; /* hardware RGBA blit and scale */
unsigned int blit_planar:1; /* hardbare YUV blit and scale */
};
 
 
177,7 → 178,7
 
int fplay_init_context(vst_t *vst);
 
int init_audio(int format);
int init_audio(vst_t* vst);
int audio_thread(void *param);
void set_audio_volume(int left, int right);