XMMS2
Functions
sample.c File Reference
#include <glib.h>
#include <xmms/xmms_sample.h>

Functions

gint xmms_sample_frame_size_get (const xmms_stream_type_t *st)
 Get number of bytes used for one sample length worth of music. More...
 
gint64 xmms_sample_ms_to_samples (const xmms_stream_type_t *st, gint64 milliseconds)
 convert from milliseconds to samples for this format. More...
 
gint64 xmms_sample_samples_to_ms (const xmms_stream_type_t *st, gint64 samples)
 Convert from samples to milliseconds for this format. More...
 
gint64 xmms_sample_samples_to_bytes (const xmms_stream_type_t *st, gint64 samples)
 Convert from samples to bytes for this format. More...
 
gint64 xmms_sample_bytes_to_samples (const xmms_stream_type_t *st, gint64 bytes, xmms_error_t *error)
 Convert from bytes to samples for this format. More...
 
gint64 xmms_sample_bytes_to_samples_inexact (const xmms_stream_type_t *st, gint64 bytes)
 Convert from bytes to samples for this format. More...
 
gint64 xmms_sample_bytes_to_ms (const xmms_stream_type_t *st, gint64 bytes)
 Convert from bytes to milliseconds for this format. More...
 
gint64 xmms_sample_ms_to_bytes (const xmms_stream_type_t *st, gint64 ms)
 Convert from milliseconds to bytes for this format. More...
 

Function Documentation

gint64 xmms_sample_bytes_to_ms ( const xmms_stream_type_t st,
gint64  bytes 
)

Convert from bytes to milliseconds for this format.

This is not exact.

Referenced by xmms_output_latency().

gint64 xmms_sample_bytes_to_samples ( const xmms_stream_type_t st,
gint64  bytes,
xmms_error_t error 
)

Convert from bytes to samples for this format.

This is exact. On error 0 is returned and error is set.

gint64 xmms_sample_bytes_to_samples_inexact ( const xmms_stream_type_t st,
gint64  bytes 
)

Convert from bytes to samples for this format.

This is not exact.

Referenced by xmms_sample_bytes_to_ms().

gint xmms_sample_frame_size_get ( const xmms_stream_type_t st)

Get number of bytes used for one sample length worth of music.

That is, (size of one sample) * channels.

Referenced by xmms_output_read(), xmms_sample_bytes_to_samples(), xmms_sample_bytes_to_samples_inexact(), xmms_sample_convert(), xmms_sample_convert_reset(), and xmms_sample_samples_to_bytes().

gint64 xmms_sample_ms_to_bytes ( const xmms_stream_type_t st,
gint64  ms 
)

Convert from milliseconds to bytes for this format.

This is not exact.

gint64 xmms_sample_ms_to_samples ( const xmms_stream_type_t st,
gint64  milliseconds 
)

convert from milliseconds to samples for this format.

Referenced by xmms_sample_ms_to_bytes().

gint64 xmms_sample_samples_to_bytes ( const xmms_stream_type_t st,
gint64  samples 
)

Convert from samples to bytes for this format.

This is exact.

Referenced by xmms_sample_ms_to_bytes().

gint64 xmms_sample_samples_to_ms ( const xmms_stream_type_t st,
gint64  samples 
)

Convert from samples to milliseconds for this format.

Referenced by xmms_sample_bytes_to_ms().