• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/minidlna/flac-1.2.1/src/plugin_winamp2/

Lines Matching defs:stream_data

44 	stream_data_struct *stream_data = (stream_data_struct*)client_data;

45 const unsigned channels = stream_data->channels, wide_samples = frame->header.blocksize;
50 if (stream_data->abort_flag)
63 stream_data_struct *stream_data = (stream_data_struct*)client_data;
68 stream_data->total_samples = metadata->data.stream_info.total_samples;
69 stream_data->bits_per_sample = metadata->data.stream_info.bits_per_sample;
70 stream_data->channels = metadata->data.stream_info.channels;
71 stream_data->sample_rate = metadata->data.stream_info.sample_rate;
73 if (stream_data->bits_per_sample!=8 && stream_data->bits_per_sample!=16 && stream_data->bits_per_sample!=24)
76 stream_data->abort_flag = true;
82 FLAC__uint64 l = (FLAC__uint64)((double)(FLAC__int64)stream_data->total_samples / (double)stream_data->sample_rate * 1000.0 + 0.5);
85 stream_data->length_in_msec = (int)l;
93 stream_data->has_replaygain = true;
94 stream_data->replay_scale = grabbag__replaygain_compute_scale_factor(peak, gain, (double)cfg.replaygain.preamp, !cfg.replaygain.hard_limit);
101 stream_data_struct *stream_data = (stream_data_struct*)client_data;
105 stream_data->abort_flag = true;
112 FLAC__bool FLAC_plugin__decoder_init(FLAC__StreamDecoder *decoder, const char *filename, FLAC__int64 filesize, stream_data_struct *stream_data, output_config_t *config)
124 if ((init_status = FLAC__stream_decoder_init_file(decoder, filename, write_callback, metadata_callback, error_callback, /*client_data=*/stream_data)) != FLAC__STREAM_DECODER_INIT_STATUS_OK)
132 stream_data->is_playing = false;
133 stream_data->abort_flag = false;
134 stream_data->has_replaygain = false;
142 if (stream_data->abort_flag) return false; /* metadata callback already popped up the error dialog */
144 stream_data->output_bits_per_sample = stream_data->has_replaygain && cfg.replaygain.enable ?
146 cfg.resolution.normal.dither_24_to_16 ? min(stream_data->bits_per_sample, 16) : stream_data->bits_per_sample;
148 if (stream_data->has_replaygain && cfg.replaygain.enable && cfg.resolution.replaygain.dither)
149 FLAC__replaygain_synthesis__init_dither_context(&stream_data->dither_context, stream_data->bits_per_sample, cfg.resolution.replaygain.noise_shaping);
151 stream_data->eof = false;
152 stream_data->seek_to = -1;
153 stream_data->is_playing = true;
154 stream_data->average_bps = (unsigned)(filesize / (125.*(double)(FLAC__int64)stream_data->total_samples/(double)stream_data->sample_rate));
184 int FLAC_plugin__seek(FLAC__StreamDecoder *decoder, stream_data_struct *stream_data)
187 FLAC__uint64 target_sample = stream_data->total_samples * stream_data->seek_to / stream_data->length_in_msec;
189 if (stream_data->total_samples > 0 && target_sample >= stream_data->total_samples && target_sample > 0)
190 target_sample = stream_data->total_samples - 1;
193 stream_data->seek_to = -1;
194 stream_data->eof = false;
196 pos = (int)(target_sample*1000 / stream_data->sample_rate);
211 unsigned FLAC_plugin__decode(FLAC__StreamDecoder *decoder, stream_data_struct *stream_data, char *sample_buffer)
218 stream_data->eof = true;
224 stream_data->eof = true;
234 const unsigned channels = stream_data->channels;
238 if (cfg.replaygain.enable && stream_data->has_replaygain)
243 stream_data->output_bits_per_sample == 8, /* unsigned_data_out */
247 stream_data->bits_per_sample,
248 stream_data->output_bits_per_sample,
249 stream_data->replay_scale,
252 &stream_data->dither_context
262 stream_data->bits_per_sample,
263 stream_data->output_bits_per_sample
275 stream_data->eof = true;
280 int FLAC_plugin__get_rate(unsigned written_time, unsigned output_time, stream_data_struct *stream_data)
292 stream_data->average_bps;