diff options
author | N.N. <sevyves@users.sourceforge.net> | 2004-11-14 22:52:23 +0000 |
---|---|---|
committer | N.N. <sevyves@users.sourceforge.net> | 2004-11-14 22:52:23 +0000 |
commit | bf6d0609625714ed52acf19a007a378645de2faa (patch) | |
tree | 90043f233bffdd86898813e0fe7cb92582b8459a /modules/pdp_rec~.c | |
parent | 5ad46a9a497ae0e6565b54aaefd4357eac6be0dd (diff) |
PiDiP v 0.12.17
svn path=/trunk/externals/pidip/; revision=2272
Diffstat (limited to 'modules/pdp_rec~.c')
-rw-r--r-- | modules/pdp_rec~.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/pdp_rec~.c b/modules/pdp_rec~.c index 2a0d68e..5b217dd 100644 --- a/modules/pdp_rec~.c +++ b/modules/pdp_rec~.c @@ -445,8 +445,8 @@ static t_int *pdp_rec_perform(t_int *w) if (fsample < -1.0) { fsample = -1.0; } isample=(short) (32767.0 * fsample); x->x_audio_buf[1][x->x_audioin_position]=isample; - x->x_audioin_position=(x->x_audioin_position+1)%(2*MAX_AUDIO_PACKET_SIZE); - if ( x->x_audioin_position == 2*MAX_AUDIO_PACKET_SIZE-1 ) + x->x_audioin_position=(x->x_audioin_position+1)%(MAX_AUDIO_PACKET_SIZE); + if ( x->x_audioin_position == MAX_AUDIO_PACKET_SIZE-1 ) { post( "pdp_rec~ : reaching end of audio buffer" ); } @@ -624,6 +624,7 @@ static void pdp_rec_free(t_pdp_rec *x) pdp_packet_mark_unused(x->x_packet0); // close video file if existing pdp_rec_close(x); + pdp_rec_free_ressources(x); for ( i=0; i<x->x_channels; i++) { if ( x->x_audio_buf[i] ) freebytes( x->x_audio_buf[i], MAX_AUDIO_PACKET_SIZE*sizeof(int16_t) ); |