Skip to content

Commit

Permalink
Add getter for read sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
8W9aG committed Nov 27, 2017
1 parent c760fc1 commit 3ef0b16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/vorbis/vorbisfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ extern double ov_time_tell(OggVorbis_File *vf);
extern vorbis_info *ov_info(OggVorbis_File *vf,int link);
extern vorbis_comment *ov_comment(OggVorbis_File *vf,int link);
extern void ov_set_read_size(OggVorbis_File *vf,int read_size);
extern int ov_get_read_size(OggVorbis_File *vf);

extern long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int samples,
int *bitstream);
Expand Down
4 changes: 4 additions & 0 deletions lib/vorbisfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1916,6 +1916,10 @@ void ov_set_read_size(OggVorbis_File *vf,int read_size) {
vf->read_size = MAX(1, MIN(read_size, CHUNKSIZE));
}

int ov_get_read_size(OggVorbis_File *vf) {
return vf->read_size;
}

static int host_is_big_endian() {
ogg_int32_t pattern = 0xfeedface; /* deadbeef */
unsigned char *bytewise = (unsigned char *)&pattern;
Expand Down

0 comments on commit 3ef0b16

Please sign in to comment.