X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fvalerie%2Fvalerie.c;h=ba8e228025d5f8798f9d33eb397530aea2b32b56;hb=870a1069dd7a1b33623f3284c089b9be2dfb4491;hp=428ed0b6ab8c99013355a121008ec8538394f7d0;hpb=5c299d1ae6f3535df35b3f30bae0476a1ca50aa6;p=melted diff --git a/src/valerie/valerie.c b/src/valerie/valerie.c index 428ed0b..ba8e228 100644 --- a/src/valerie/valerie.c +++ b/src/valerie/valerie.c @@ -184,7 +184,7 @@ valerie_error_code valerie_unit_add( valerie this, char *guid, int *unit ) if ( error == valerie_ok ) { int length = valerie_response_count( this->last_response ); - char *line = valerie_response_get_line( this->last_response, length - 2 ); + char *line = valerie_response_get_line( this->last_response, length - 1 ); if ( line == NULL || sscanf( line, "U%d", unit ) != 1 ) error = valerie_unit_creation_failed; } @@ -260,6 +260,14 @@ valerie_error_code valerie_unit_clean( valerie this, int unit ) return valerie_execute( this, 1024, "CLEAN U%d", unit ); } +/** Clear the unit - this function removes all clips. +*/ + +valerie_error_code valerie_unit_clear( valerie this, int unit ) +{ + return valerie_execute( this, 1024, "CLEAR U%d", unit ); +} + /** Move clips on the units playlist. */ @@ -297,7 +305,7 @@ valerie_error_code valerie_unit_clip_insert( valerie this, int unit, valerie_cli { char temp[ 100 ]; valerie_interpret_clip_offset( temp, offset, clip ); - return valerie_execute( this, 1024, "INSERT U%d %s %s %d %d", unit, file, temp, in, out ); + return valerie_execute( this, 1024, "INSERT U%d \"%s\" %s %d %d", unit, file, temp, in, out ); } /** Play the unit at normal speed.