Lines Matching refs:stream_data_
136 static stream_data_struct stream_data_; variable
155 if (stream_data_.is_playing) { in set_track_info()
156 … length_in_msec, stream_data_.sample_rate * stream_data_.channels * stream_data_.bits_per_sample, … in set_track_info()
281 stream_data_.abort_flag = false; in FLAC_XMMS__play_file()
282 stream_data_.is_playing = false; in FLAC_XMMS__play_file()
283 stream_data_.is_http_source = is_http_source(filename); in FLAC_XMMS__play_file()
284 stream_data_.eof = false; in FLAC_XMMS__play_file()
285 stream_data_.play_thread_open = false; in FLAC_XMMS__play_file()
286 stream_data_.has_replaygain = false; in FLAC_XMMS__play_file()
300 if(stream_data_.has_replaygain && flac_cfg.output.replaygain.enable) { in FLAC_XMMS__play_file()
302 stream_data_.sample_format = FMT_U8; in FLAC_XMMS__play_file()
303 stream_data_.sample_format_bytes_per_sample = 1; in FLAC_XMMS__play_file()
306 stream_data_.sample_format = (is_big_endian_host_) ? FMT_S16_BE : FMT_S16_LE; in FLAC_XMMS__play_file()
307 stream_data_.sample_format_bytes_per_sample = 2; in FLAC_XMMS__play_file()
317 if(stream_data_.bits_per_sample == 8) { in FLAC_XMMS__play_file()
318 stream_data_.sample_format = FMT_U8; in FLAC_XMMS__play_file()
319 stream_data_.sample_format_bytes_per_sample = 1; in FLAC_XMMS__play_file()
321 …else if(stream_data_.bits_per_sample == 16 || (stream_data_.bits_per_sample == 24 && flac_cfg.outp… in FLAC_XMMS__play_file()
322 stream_data_.sample_format = (is_big_endian_host_) ? FMT_S16_BE : FMT_S16_LE; in FLAC_XMMS__play_file()
323 stream_data_.sample_format_bytes_per_sample = 2; in FLAC_XMMS__play_file()
327 fprintf(stderr, "libxmms-flac: can't handle %u bit output\n", stream_data_.bits_per_sample); in FLAC_XMMS__play_file()
332 …FLAC__replaygain_synthesis__init_dither_context(&stream_data_.dither_context, stream_data_.sample_… in FLAC_XMMS__play_file()
333 stream_data_.is_playing = true; in FLAC_XMMS__play_file()
335 …if(flac_ip.output->open_audio(stream_data_.sample_format, stream_data_.sample_rate, stream_data_.c… in FLAC_XMMS__play_file()
341 stream_data_.title = flac_format_song_title(filename); in FLAC_XMMS__play_file()
342 …stream_data_.title, stream_data_.length_in_msec, stream_data_.sample_rate * stream_data_.channels … in FLAC_XMMS__play_file()
344 stream_data_.seek_to_in_sec = -1; in FLAC_XMMS__play_file()
345 stream_data_.play_thread_open = true; in FLAC_XMMS__play_file()
351 if(stream_data_.is_playing) { in FLAC_XMMS__stop()
352 stream_data_.is_playing = false; in FLAC_XMMS__stop()
353 if(stream_data_.play_thread_open) { in FLAC_XMMS__stop()
354 stream_data_.play_thread_open = false; in FLAC_XMMS__stop()
369 if(!stream_data_.is_http_source) { in FLAC_XMMS__seek()
370 stream_data_.seek_to_in_sec = time; in FLAC_XMMS__seek()
371 stream_data_.eof = false; in FLAC_XMMS__seek()
373 while(stream_data_.seek_to_in_sec != -1) in FLAC_XMMS__seek()
382 if(!stream_data_.is_playing || (stream_data_.eof && !flac_ip.output->buffer_playing())) in FLAC_XMMS__get_time()
445 while(stream_data_.is_playing) { in play_loop_()
446 if(!stream_data_.eof) { in play_loop_()
452 stream_data_.eof = true; in play_loop_()
458 stream_data_.eof = true; in play_loop_()
463 …if(stream_data_.is_http_source || !FLAC__stream_decoder_get_decode_position(decoder_, &decode_posi… in play_loop_()
468 int bytes = n * stream_data_.channels * stream_data_.sample_format_bytes_per_sample; in play_loop_()
469 …le_buffer_start = sample_buffer_ + sample_buffer_first_ * stream_data_.channels * stream_data_.sam… in play_loop_()
474 …flac_ip.add_vis_pcm(flac_ip.output->written_time(), stream_data_.sample_format, stream_data_.chann… in play_loop_()
475 …while(flac_ip.output->buffer_free() < (int)bytes && stream_data_.is_playing && stream_data_.seek_t… in play_loop_()
477 if(stream_data_.is_playing && stream_data_.seek_to_in_sec == -1) in play_loop_()
490 stream_data_.sample_rate * stream_data_.channels * stream_data_.bits_per_sample; in play_loop_()
496 stream_data_.eof = true; in play_loop_()
502 if(!stream_data_.is_http_source && stream_data_.seek_to_in_sec != -1) { in play_loop_()
503 …const double distance = (double)stream_data_.seek_to_in_sec * 1000.0 / (double)stream_data_.length… in play_loop_()
504 FLAC__uint64 target_sample = (FLAC__uint64)(distance * (double)stream_data_.total_samples); in play_loop_()
505 if(stream_data_.total_samples > 0 && target_sample >= stream_data_.total_samples) in play_loop_()
506 target_sample = stream_data_.total_samples - 1; in play_loop_()
508 flac_ip.output->flush(stream_data_.seek_to_in_sec * 1000); in play_loop_()
512 stream_data_.eof = false; in play_loop_()
519 stream_data_.eof = false; in play_loop_()
522 stream_data_.seek_to_in_sec = -1; in play_loop_()
529 …flac_ip.set_info(stream_data_.title, stream_data_.length_in_msec, bitrate_history_[bh_index_o], st… in play_loop_()
540 g_free(stream_data_.title); in play_loop_()
557 if(stream_data_.is_http_source) { in safe_decoder_init_()
559 …rite_callback_, metadata_callback_, error_callback_, /*client_data=*/&stream_data_) != FLAC__STREA… in safe_decoder_init_()
563 …rite_callback_, metadata_callback_, error_callback_, /*client_data=*/&stream_data_) != FLAC__STREA… in safe_decoder_init_()
577 if(stream_data_.is_http_source) in safe_decoder_finish_()