r4039 - in trunk: . tools
- From: timj svn gnome org
- To: svn-commits-list gnome org
- Subject: r4039 - in trunk: . tools
- Date: Mon, 30 Oct 2006 13:12:45 -0500 (EST)
Author: timj
Date: 2006-10-30 13:12:42 -0500 (Mon, 30 Oct 2006)
New Revision: 4039
Modified:
trunk/ChangeLog
trunk/tools/bsefextract.cc
trunk/tools/bsewavetool.cc
Log:
Mon Oct 30 19:12:12 2006 Tim Janik <timj gtk org>
* tools/bsefextract.cc: some cosmetic fixups. fixed printf format strings
for size_t types.
* tools/bsewavetool.cc: resolved C++ pow() call ambiguities.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-10-30 15:51:13 UTC (rev 4038)
+++ trunk/ChangeLog 2006-10-30 18:12:42 UTC (rev 4039)
@@ -1,3 +1,10 @@
+Mon Oct 30 19:12:12 2006 Tim Janik <timj gtk org>
+
+ * tools/bsefextract.cc: some cosmetic fixups. fixed printf format strings
+ for size_t types.
+
+ * tools/bsewavetool.cc: resolved C++ pow() call ambiguities.
+
Wed Oct 25 17:47:44 2006 Stefan Westerfeld <stefan space twc de>
* tools/bsefextract.cc: Implemented --join-spectrum-slices, which
Modified: trunk/tools/bsefextract.cc
===================================================================
--- trunk/tools/bsefextract.cc 2006-10-30 15:51:13 UTC (rev 4038)
+++ trunk/tools/bsefextract.cc 2006-10-30 18:12:42 UTC (rev 4039)
@@ -179,27 +179,31 @@
bool extract_feature; /* did the user enable this feature with --feature? */
string
- double_to_string (double value, bool align = false) const
+ double_to_string (double value,
+ bool align = false) const
{
gchar numbuf[G_ASCII_DTOSTR_BUF_SIZE + 1] = "";
g_ascii_formatd (numbuf, G_ASCII_DTOSTR_BUF_SIZE, align ? "%-15.9g" : "%.9g", value);
return numbuf;
}
- void print_value (const string& value_name, double data) const
+ void
+ print_value (const string& value_name, double data) const
{
fprintf (options.output_file, "%s = %s;\n", value_name.c_str(), double_to_string (data).c_str());
}
- void print_vector (const string& vector_name, const vector<double>& data) const
+ void
+ print_vector (const string& vector_name, const vector<double>& data) const
{
- fprintf (options.output_file, "%s[%ld] = {", vector_name.c_str(), data.size());
+ fprintf (options.output_file, "%s[%zd] = {", vector_name.c_str(), data.size());
for (vector<double>::const_iterator di = data.begin(); di != data.end(); di++)
fprintf (options.output_file, " %s", double_to_string (*di, true).c_str());
fprintf (options.output_file, " };\n");
}
- void print_matrix (const string& matrix_name, const vector< vector<double> >& matrix) const
+ void
+ print_matrix (const string& matrix_name, const vector< vector<double> >& matrix) const
{
/* for a m x n matrix, we write
*
@@ -211,7 +215,7 @@
* { x_m1 x_m2 ... x_mn }
* };
*/
- fprintf (options.output_file, "%s[%ld,%ld] = {\n",
+ fprintf (options.output_file, "%s[%zd,%zd] = {\n",
matrix_name.c_str(), matrix.size(), matrix.size() ? matrix[0].size() : 0);
for (vector< vector<double> >::const_iterator mi = matrix.begin(); mi != matrix.end(); mi++)
@@ -241,11 +245,13 @@
struct StartTimeFeature : public Feature
{
double start_time;
- StartTimeFeature() : Feature ("--start-time", "signal start time in ms (first non-zero sample)")
+ StartTimeFeature() :
+ Feature ("--start-time", "signal start time in ms (first non-zero sample)")
{
start_time = -1;
}
- void compute (const Signal& signal)
+ void
+ compute (const Signal& signal)
{
for (GslLong l = options.channel; l < signal.length(); l += signal.n_channels())
{
@@ -256,7 +262,8 @@
}
}
}
- void print_results() const
+ void
+ print_results() const
{
print_value ("start_time", start_time);
}
Modified: trunk/tools/bsewavetool.cc
===================================================================
--- trunk/tools/bsewavetool.cc 2006-10-30 15:51:13 UTC (rev 4038)
+++ trunk/tools/bsewavetool.cc 2006-10-30 18:12:42 UTC (rev 4039)
@@ -869,7 +869,7 @@
if (ochunk.midi_note)
{
SfiNum num = g_ascii_strtoull (ochunk.midi_note, NULL, 10);
- osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69 /* MIDI kammer note */);
+ osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69. /* MIDI kammer note */);
xinfos = bse_xinfos_add_num (xinfos, "midi-note", num);
}
else if (ochunk.osc_freq)
@@ -894,7 +894,7 @@
if (auto_extract_type == 1)
{
SfiNum num = int (str2num (bname, nth));
- osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69 /* MIDI kammer note */);
+ osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69. /* MIDI kammer note */);
xinfos = bse_xinfos_add_num (xinfos, "midi-note", num);
}
else
@@ -1014,7 +1014,7 @@
if (note_str)
{
SfiNum num = g_ascii_strtoull (note_str, NULL, 10);
- osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69 /* MIDI kammer note */);
+ osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69. /* MIDI kammer note */);
location = OSC_FREQ;
}
}
@@ -1153,7 +1153,7 @@
else if (parse_str_option (argv, i, "-m", &str, argc))
{
SfiNum num = g_ascii_strtoull (str, NULL, 10);
- gfloat osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69 /* MIDI kammer note */);
+ gfloat osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69. /* MIDI kammer note */);
freq_list.push_back (osc_freq);
seen_selection = true;
}
@@ -1283,7 +1283,7 @@
else if (parse_str_option (argv, i, "-m", &str, argc))
{
SfiNum num = g_ascii_strtoull (str, NULL, 10);
- gfloat osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69 /* MIDI kammer note */);
+ gfloat osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69. /* MIDI kammer note */);
freq_list.push_back (osc_freq);
seen_selection = true;
}
@@ -1832,7 +1832,7 @@
else if (parse_str_option (argv, i, "-m", &str, argc))
{
SfiNum num = g_ascii_strtoull (str, NULL, 10);
- gfloat osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69 /* MIDI kammer note */);
+ gfloat osc_freq = 440.0 /* MIDI standard pitch */ * pow (BSE_2_POW_1_DIV_12, num - 69. /* MIDI kammer note */);
freq_list.push_back (osc_freq);
seen_selection = true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]