marlin r1333 - trunk/marlin
- From: iain svn gnome org
- To: svn-commits-list gnome org
- Subject: marlin r1333 - trunk/marlin
- Date: Tue, 4 Nov 2008 00:59:04 +0000 (UTC)
Author: iain
Date: Tue Nov 4 00:59:04 2008
New Revision: 1333
URL: http://svn.gnome.org/viewvc/marlin?rev=1333&view=rev
Log:
:Squashed commit of the following:
commit e418195f8272636567e9fbf9ca0512a277ac2f1d
Author: iain <iain gnome org>
Date: Tue Nov 4 00:57:19 2008 +0000
Fix buffer overrun causing crash when right channel generates more
frames than the left.
commit 2b633968f22d7be919330656f47a141ea737257c
Author: iain <iain gnome org>
Date: Sun Nov 2 00:58:57 2008 +0000
Check for jackd
commit d96f9ca802c8508440ed5a611f0c42eca1e33278
Author: iain <iain gnome org>
Date: Sun Nov 2 00:39:04 2008 +0000
Turn off the Process menu whenever the sample is playing.
Stop sample playing whenever the window is closed
commit 647984e8cad2cb3d6885609fff53521ac1a345ed
Author: iain <iain gnome org>
Date: Sat Nov 1 02:01:40 2008 +0000
Only need one progress window in the struct...save 4bytes every
window!!!!
commit 4603444f3c9aad0ac8b47c8edb22e823231670eb
Author: iain <iain gnome org>
Date: Sat Nov 1 01:55:36 2008 +0000
Take name of new sample from the beginning marker, rather than the end
Modified:
trunk/marlin/ChangeLog
trunk/marlin/marlin-jack-play.c
trunk/marlin/marlin-jack.c
trunk/marlin/marlin-jack.h
Modified: trunk/marlin/marlin-jack-play.c
==============================================================================
--- trunk/marlin/marlin-jack-play.c (original)
+++ trunk/marlin/marlin-jack-play.c Tue Nov 4 00:59:04 2008
@@ -435,8 +435,8 @@
{
MarlinJackPlay *jack = data;
MarlinJackPlayPrivate *priv = jack->priv;
- long generated = 0;
float *tmp_frames[2];
+ long gen_frames[2];
int i;
if (priv->mode != MARLIN_JACK_PLAY_MODE_PLAYING &&
@@ -465,20 +465,21 @@
continue;
}
- generated = src_callback_read (pd->state, priv->src_ratio,
- frames_needed, pd->rb_buffer);
- if (generated == 0) {
+ gen_frames[i] = src_callback_read (pd->state, priv->src_ratio,
+ frames_needed,
+ pd->rb_buffer);
+ if (gen_frames[i] == 0) {
continue;
}
tmp_frames[i] = pd->rb_buffer;
jack_ringbuffer_write (pd->rb, (char *) pd->rb_buffer,
- generated * frame_size);
+ gen_frames[i] * frame_size);
}
if (generated > 0) {
marlin_jack_emit_levels ((MarlinJack *) jack,
- (float **) tmp_frames, generated);
+ (float **) tmp_frames, gen_frames);
}
priv->mode = MARLIN_JACK_PLAY_MODE_PLAYING;
Modified: trunk/marlin/marlin-jack.c
==============================================================================
--- trunk/marlin/marlin-jack.c (original)
+++ trunk/marlin/marlin-jack.c Tue Nov 4 00:59:04 2008
@@ -270,11 +270,11 @@
void
calculate_peak_and_rms (float *data,
- int n_frames,
+ long n_frames,
double *peak,
double *rms)
{
- int i;
+ long i;
double p = 0.0, total = 0.0;
for (i = 0; i < n_frames; i++) {
@@ -291,7 +291,7 @@
void
marlin_jack_emit_levels (MarlinJack *jack,
float **data,
- int n_frames)
+ long *n_frames)
{
MarlinJackPrivate *priv = GET_PRIVATE (jack);
double p, r;
@@ -306,12 +306,12 @@
return;
}
- calculate_peak_and_rms (data[0], n_frames, &p, &r);
+ calculate_peak_and_rms (data[0], n_frames[0], &p, &r);
peak[0] = p;
rms[0] = r;
if (priv->channels > 1) {
- calculate_peak_and_rms (data[1], n_frames, &p, &r);
+ calculate_peak_and_rms (data[1], n_frames[1], &p, &r);
peak[1] = p;
rms[1] = r;
}
Modified: trunk/marlin/marlin-jack.h
==============================================================================
--- trunk/marlin/marlin-jack.h (original)
+++ trunk/marlin/marlin-jack.h Tue Nov 4 00:59:04 2008
@@ -80,7 +80,7 @@
void marlin_jack_emit_levels (MarlinJack *jack,
float **data,
- int n_frames);
+ long *n_frames);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]