예제 #1
0
 def insert(self, index, gfile, gain=1.0, peak=1.0):
     # TODO: handle index error like list does
     next_obj = self[index]._obj
     lib.groove_playlist_insert(self._obj, gfile._obj, gain, peak, next_obj)
예제 #2
0
 def append(self, gfile, gain=1.0, peak=1.0):
     # TODO: better error handling
     new_item = lib.groove_playlist_insert(self._obj, gfile._obj, gain, peak, ffi.NULL)
     assert new_item != ffi.NULL, "Out of Memory"
예제 #3
0
 def __setitem__(self, index, value):
     remove_obj = self[index]._obj
     lib.groove_playlist_insert(self._obj, value._obj, 1.0, 1.0, remove_obj)
     lib.groove_playlist_remove(self._obj, remove_obj)