Skip to content

Commit

Permalink
more on 1.0.26
Browse files Browse the repository at this point in the history
  • Loading branch information
vokimon committed Mar 9, 2016
1 parent b7cb00e commit d99693b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
24 changes: 19 additions & 5 deletions wavefile/libsndfile.py
Expand Up @@ -404,6 +404,22 @@ def __init_lib_methods():
_lib.sf_current_byterate.restype = ct.c_int
_lib.sf_current_byterate.argtypes = [SNDFILE]

# TODO: Chunks, new undocumented feature in 1.0.26

#struct SF_CHUNK_INFO
#{ char id [64] ; /* The chunk identifier. */
# unsigned id_size ; /* The size of the chunk identifier. */
# unsigned datalen ; /* The size of that data. */
# void *data ; /* Pointer to the data. */
#} ;

#typedef struct SF_CHUNK_INFO SF_CHUNK_INFO ;
#int sf_set_chunk (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) ;
#typedef struct SF_CHUNK_ITERATOR SF_CHUNK_ITERATOR ;
#SF_CHUNK_ITERATOR * sf_get_chunk_iterator (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) ;
#SF_CHUNK_ITERATOR * sf_next_chunk_iterator (SF_CHUNK_ITERATOR * iterator) ;
#int sf_get_chunk_size (const SF_CHUNK_ITERATOR * it, SF_CHUNK_INFO * chunk_info) ;
#int sf_get_chunk_data (const SF_CHUNK_ITERATOR * it, SF_CHUNK_INFO * chunk_info) ;

__init_lib_methods()

Expand All @@ -414,10 +430,8 @@ class OPEN_MODES():
SFM_WRITE = 0x20
SFM_RDWR = 0x30

# deprecated
class SEEK_MODES():
#stdio.h :
SEEK_SET = 0
SEEK_CUR = 1
SEEK_END = 2
SF_SEEK_SET = 0
SF_SEEK_CUR = 1
SF_SEEK_END = 2

6 changes: 3 additions & 3 deletions wavefile/wavefile.py
Expand Up @@ -131,9 +131,9 @@ class Format :
ENDMASK = 0x30000000

class Seek() :
SET = SEEK_MODES.SEEK_SET # Relative to the begining of the file
CUR = SEEK_MODES.SEEK_CUR # Relative to the last read frame
END = SEEK_MODES.SEEK_END # Relative to the end of the file
SET = SEEK_MODES.SF_SEEK_SET # Relative to the begining of the file
CUR = SEEK_MODES.SF_SEEK_CUR # Relative to the last read frame
END = SEEK_MODES.SF_SEEK_END # Relative to the end of the file


class WaveMetadata(object) :
Expand Down

0 comments on commit d99693b

Please sign in to comment.