[med-svn] [Git][med-team/praat][master] 3 commits: New upstream version 6.4.22+dfsg
Rafael Laboissière (@rafael)
gitlab at salsa.debian.org
Wed Oct 9 15:50:32 BST 2024
Rafael Laboissière pushed to branch master at Debian Med / praat
Commits:
e9b92818 by Rafael Laboissière at 2024-10-09T03:24:18-03:00
New upstream version 6.4.22+dfsg
- - - - -
0866f0e7 by Rafael Laboissière at 2024-10-09T03:26:13-03:00
Update upstream source from tag 'upstream/6.4.22+dfsg'
Update to upstream version '6.4.22+dfsg'
with Debian dir 7b77e403cfa827a42a61b512fdd66d3d58c0460a
- - - - -
3c2934ab by Rafael Laboissière at 2024-10-09T03:32:42-03:00
d/changelog: Add entry for release 6.4.22+dfsg-1
Gbp-Dch: Ignore
- - - - -
18 changed files:
- debian/changelog
- dwtools/Configuration.cpp
- dwtools/Discriminant.cpp
- dwtools/SSCP.cpp
- dwtools/SpeechSynthesizer.cpp
- dwtools/praat_David_init.cpp
- external/espeak/speech.cpp
- external/espeak/wavegen.cpp
- fon/manual_scripting.cpp
- fon/manual_whatsnew.cpp
- main/main_Praat.cpp
- main/main_Praat.h
- main/praat.plist
- melder/melder_kar.h
- sys/GuiFileSelect.cpp
- sys/Interpreter.cpp
- sys/ScriptEditor.cpp
- sys/motifEmulator.cpp
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+praat (6.4.22+dfsg-1) unstable; urgency=medium
+
+ * New upstream version 6.4.22+dfsg
+
+ -- Rafael Laboissière <rafael at debian.org> Wed, 09 Oct 2024 03:32:15 -0300
+
praat (6.4.21+dfsg-1) unstable; urgency=medium
* New upstream version 6.4.21+dfsg
=====================================
dwtools/Configuration.cpp
=====================================
@@ -287,12 +287,25 @@ void Configuration_rotateToPrincipalDirections (Configuration me) {
}
}
-void Configuration_draw (Configuration me, Graphics g, int xCoordinate, int yCoordinate, double xmin, double xmax, double ymin, double ymax, int labelSize, bool useRowLabels, conststring32 label, bool garnish)
+void Configuration_draw (Configuration me, Graphics g, int horizontalDimension, int verticalDimension,
+ double xmin, double xmax, double ymin, double ymax, int labelSize, bool useRowLabels, conststring32 label, bool garnish)
{
- if (my numberOfColumns > 1 && (xCoordinate > my numberOfColumns || yCoordinate > my numberOfColumns))
- return;
- if (my numberOfColumns == 1)
- xCoordinate = 1;
+ Melder_require (horizontalDimension > 0,
+ U"The horizontal dimension should be positive, not ", horizontalDimension, U".");
+ Melder_require (horizontalDimension <= my numberOfColumns,
+ U"The horizontal dimension should not exceed the number of dimensions (", my numberOfColumns,
+ U"), but is in fact ", horizontalDimension, U"."
+ );
+ Melder_require (verticalDimension > 0,
+ U"The vertical dimension should be positive, not ", verticalDimension, U".");
+ Melder_require (verticalDimension <= my numberOfColumns,
+ U"The vertical dimension should not exceed the number of dimensions (", my numberOfColumns,
+ U"), but is in fact ", verticalDimension, U"."
+ );
+ Melder_require (horizontalDimension != verticalDimension,
+ U"The horizontal dimension and the vertical dimension should be different, but are in fact ",
+ horizontalDimension, U" and ", verticalDimension, U"."
+ );
const double fontSize = Graphics_inqFontSize (g);
int noLabel = 0;
if (labelSize == 0)
@@ -300,8 +313,8 @@ void Configuration_draw (Configuration me, Graphics g, int xCoordinate, int yCoo
autoVEC x = raw_VEC (my numberOfRows);
autoVEC y = raw_VEC (my numberOfRows);
for (integer irow = 1; irow <= my numberOfRows; irow ++) {
- x [irow] = my data [irow] [xCoordinate] * my w [xCoordinate];
- y [irow] = ( my numberOfColumns > 1 ? my data [irow] [yCoordinate] * my w [yCoordinate] : 0.0 );
+ x [irow] = my data [irow] [horizontalDimension] * my w [horizontalDimension];
+ y [irow] = my data [irow] [verticalDimension] * my w [verticalDimension];
}
if (xmax <= xmin) {
xmin = NUMmin_u (x.get());
@@ -343,16 +356,15 @@ void Configuration_draw (Configuration me, Graphics g, int xCoordinate, int yCoo
Graphics_marksBottom (g, 2, true, true, false);
if (my numberOfColumns > 1) {
Graphics_marksLeft (g, 2, true, true, false);
- if (my columnLabels [xCoordinate]) {
- Graphics_textBottom (g, true, my columnLabels [xCoordinate].get());
- }
- if (my columnLabels [yCoordinate]) {
- Graphics_textLeft (g, true, my columnLabels [yCoordinate].get());
- }
+ if (my columnLabels [horizontalDimension])
+ Graphics_textBottom (g, true, my columnLabels [horizontalDimension].get());
+ if (my columnLabels [verticalDimension])
+ Graphics_textLeft (g, true, my columnLabels [verticalDimension].get());
}
}
if (noLabel > 0) {
- Melder_warning (U"Configuration_draw: ", noLabel, U" from ", my numberOfRows, U" labels are not visible because they are empty or they contain only spaces or they contain only non-printable characters");
+ Melder_warning (U"Configuration: Draw: ", noLabel, U" out of ", my numberOfRows,
+ U" labels are not visible, because they are empty or they contain only spaces and/or other non-printable characters.");
}
}
=====================================
dwtools/Discriminant.cpp
=====================================
@@ -336,7 +336,8 @@ void Discriminant_drawTerritorialMap (Discriminant me, Graphics g, bool discrimi
void Discriminant_drawConcentrationEllipses (Discriminant me, Graphics g, double scale, bool confidence,
conststring32 label, bool discriminantDirections,
- integer d1, integer d2, double xmin, double xmax, double ymin, double ymax, double fontSize, bool garnish) {
+ integer d1, integer d2, double xmin, double xmax, double ymin, double ymax, double fontSize, bool garnish)
+{
const integer numberOfFunctions = Discriminant_getNumberOfFunctions (me);
if (! discriminantDirections) {
=====================================
dwtools/SSCP.cpp
=====================================
@@ -662,49 +662,65 @@ autoSSCPList SSCPList_toTwoDimensions (SSCPList me, constVECVU const& v1, constV
}
}
-void SSCPList_drawConcentrationEllipses (SSCPList me, Graphics g, double scale, bool confidence, conststring32 label, integer d1, integer d2, double xmin, double xmax, double ymin, double ymax, double fontSize, bool garnish) {
- const SSCP t = my at [1];
-
- Melder_require (d1 > 0 && d1 <= t -> numberOfColumns && d2 > 0 && d2 <= t -> numberOfColumns && d1 != d2,
- U"Incorrect axes.");
- autoSSCPList thee = SSCPList_extractTwoDimensions (me, d1, d2);
- /*
- Autowindowing.
- */
- if (xmin == xmax || ymin == ymax) {
- double boundingBox_xmin, boundingBox_xmax, boundingBox_ymin, boundingBox_ymax;
- SSCPList_getEllipsesBoundingBoxCoordinates (thee.get(), scale, confidence,
- & boundingBox_xmin, & boundingBox_xmax, & boundingBox_ymin, & boundingBox_ymax);
- if (xmin == xmax) {
- xmin = boundingBox_xmin;
- xmax = boundingBox_xmax;
- }
- if (ymin == ymax) {
- ymin = boundingBox_ymin;
- ymax = boundingBox_ymax;
+void SSCPList_drawConcentrationEllipses (SSCPList me, Graphics g, double scale, bool confidence, conststring32 label,
+ integer dimension1, integer dimension2, double xmin, double xmax, double ymin, double ymax, double fontSize, bool garnish)
+{
+ try {
+ const SSCP t = my at [1];
+
+ Melder_require (dimension1 > 0,
+ U"Dimension 1 should be positive, not ", dimension1, U".");
+ Melder_require (dimension1 <= t -> numberOfColumns,
+ U"Dimension 1 should not exceed the number of dimensions (", t -> numberOfColumns, U"), but is in fact ", dimension1, U".");
+ Melder_require (dimension2 > 0,
+ U"Dimension 2 should be positive, not ", dimension2, U".");
+ Melder_require (dimension2 <= t -> numberOfColumns,
+ U"Dimension 2 should not exceed the number of dimensions (", t -> numberOfColumns, U"), but is in fact ", dimension2, U".");
+ Melder_require (dimension1 != dimension2,
+ U"Dimension 1 and dimension 2 should be different, but are in fact ", dimension1, U" and ", dimension2, U".");
+ autoSSCPList thee = SSCPList_extractTwoDimensions (me, dimension1, dimension2);
+ /*
+ Autowindowing.
+ */
+ if (xmin == xmax || ymin == ymax) {
+ double boundingBox_xmin, boundingBox_xmax, boundingBox_ymin, boundingBox_ymax;
+ SSCPList_getEllipsesBoundingBoxCoordinates (thee.get(), scale, confidence,
+ & boundingBox_xmin, & boundingBox_xmax, & boundingBox_ymin, & boundingBox_ymax);
+ if (xmin == xmax) {
+ xmin = boundingBox_xmin;
+ xmax = boundingBox_xmax;
+ }
+ if (ymin == ymax) {
+ ymin = boundingBox_ymin;
+ ymax = boundingBox_ymax;
+ }
}
- }
- Graphics_setWindow (g, xmin, xmax, ymin, ymax);
- Graphics_setInner (g);
+ Graphics_setWindow (g, xmin, xmax, ymin, ymax);
+ Graphics_setInner (g);
- for (integer i = 1; i <= thy size; i ++) {
- const SSCP ti = thy at [i];
- const double lscale = SSCP_getEllipseScalefactor (ti, scale, confidence);
- if (lscale < 0.0)
- continue;
- if (! label || Melder_cmp (label, Thing_getName (ti)) == 0)
- SSCP_drawTwoDimensionalEllipse_inside (ti, g, lscale, Thing_getName (ti), fontSize);
- }
+ for (integer i = 1; i <= thy size; i ++) {
+ const SSCP ti = thy at [i];
+ const double lscale = SSCP_getEllipseScalefactor (ti, scale, confidence);
+ if (lscale < 0.0)
+ continue;
+ if (! label || Melder_cmp (label, Thing_getName (ti)) == 0)
+ SSCP_drawTwoDimensionalEllipse_inside (ti, g, lscale, Thing_getName (ti), fontSize);
+ }
- Graphics_unsetInner (g);
- if (garnish) {
- const SSCP t1 = my at [1];
- Graphics_drawInnerBox (g);
- Graphics_marksLeft (g, 2, true, true, false);
- Graphics_textLeft (g, true, t1 -> columnLabels [d2] ? t1 -> columnLabels [d2].get() : Melder_cat (U"Dimension ", d2));
- Graphics_marksBottom (g, 2, true, true, false);
- Graphics_textBottom (g, true, t1 -> columnLabels [d1] ? t1 -> columnLabels [d1].get() : Melder_cat (U"Dimension ", d1));
+ Graphics_unsetInner (g);
+ if (garnish) {
+ const SSCP t1 = my at [1];
+ Graphics_drawInnerBox (g);
+ Graphics_marksLeft (g, 2, true, true, false);
+ Graphics_textLeft (g, true,
+ t1 -> columnLabels [dimension2] ? t1 -> columnLabels [dimension2].get() : Melder_cat (U"Dimension ", dimension2));
+ Graphics_marksBottom (g, 2, true, true, false);
+ Graphics_textBottom (g, true,
+ t1 -> columnLabels [dimension1] ? t1 -> columnLabels [dimension1].get() : Melder_cat (U"Dimension ", dimension1));
+ }
+ } catch (MelderError) {
+ Melder_throw (U"Concentration ellipses not drawn.");
}
}
=====================================
dwtools/SpeechSynthesizer.cpp
=====================================
@@ -201,10 +201,12 @@ static int synthCallback (short *wav, int numsamples, espeak_EVENT *events)
Table_setNumericValue (my d_events.get(), irow, 7, events -> sample);
if (events -> type == espeakEVENT_MARK || events -> type == espeakEVENT_PLAY) {
Table_setStringValue (my d_events.get(), irow, 8, Melder_peek8to32 (events -> id.name));
- } else {
+ } else if (events -> type == espeakEVENT_PHONEME) {
memcpy (phoneme_name, events -> id.string, 8);
phoneme_name [8] = 0; // because id.string is not 0-terminated if 8 chars long
Table_setStringValue (my d_events.get(), irow, 8, Melder_peek8to32 (phoneme_name));
+ } else if (events -> type == espeakEVENT_SAMPLERATE ||1) {
+ Table_setNumericValue (my d_events.get(), irow, 8, events -> id.number);
}
Table_setNumericValue (my d_events.get(), irow, 9, events -> unique_identifier);
}
@@ -471,6 +473,9 @@ static void IntervalTier_removeVeryShortIntervals (IntervalTier me) {
static autoTextGrid Table_to_TextGrid (Table me, conststring32 text, double xmin, double xmax) {
//Table_createWithColumnNames (0, L"time type type-t t-pos length a-pos sample id uniq");
+ //TRACE
+ if (Melder_isTracingLocally)
+ Table_list (me, false);
try {
const integer textLength = Melder_length (text);
const integer numberOfRows = my rows.size;
=====================================
dwtools/praat_David_init.cpp
=====================================
@@ -1467,7 +1467,7 @@ DO
FORM (GRAPHICS_EACH__Discriminant_drawOneSigmaEllipse, U"Discriminant: Draw one sigma ellipse", U"Discriminant: Draw one sigma ellipse...") {
SENTENCE (label, U"Label", U"")
POSITIVE (numberOfSigmas, U"Number of sigmas", U"1.0")
- BOOLEAN (discriminatPlane, U"Discriminant plane", true)
+ BOOLEAN (discriminantPlane, U"Discriminant plane", true)
INTEGER (xDimension, U"X-dimension", U"1")
INTEGER (yDimension, U"Y-dimension", U"2")
REAL (xmin, U"left Horizontal range", U"0.0")
@@ -1479,7 +1479,7 @@ FORM (GRAPHICS_EACH__Discriminant_drawOneSigmaEllipse, U"Discriminant: Draw one
OK
DO
GRAPHICS_EACH (Discriminant)
- Discriminant_drawConcentrationEllipses (me, GRAPHICS, numberOfSigmas, false, label, discriminatPlane,
+ Discriminant_drawConcentrationEllipses (me, GRAPHICS, numberOfSigmas, false, label, discriminantPlane,
xDimension, yDimension, xmin, xmax, ymin, ymax, labelSize, garnish
);
GRAPHICS_EACH_END
@@ -1487,7 +1487,7 @@ DO
FORM (GRAPHICS_EACH__Discriminant_drawConfidenceEllipses, U"Discriminant: Draw confidence ellipses", nullptr) {
POSITIVE (confidenceLevel, U"Confidence level (0-1)", U"0.95")
- BOOLEAN (discriminatPlane, U"Discriminant plane", true)
+ BOOLEAN (discriminantPlane, U"Discriminant plane", true)
INTEGER (xDimension, U"X-dimension", U"1")
INTEGER (yDimension, U"Y-dimension", U"2")
REAL (xmin, U"left Horizontal range", U"0.0")
@@ -1499,7 +1499,7 @@ FORM (GRAPHICS_EACH__Discriminant_drawConfidenceEllipses, U"Discriminant: Draw c
OK
DO
GRAPHICS_EACH (Discriminant)
- Discriminant_drawConcentrationEllipses (me, GRAPHICS, confidenceLevel, true, nullptr, discriminatPlane,
+ Discriminant_drawConcentrationEllipses (me, GRAPHICS, confidenceLevel, true, nullptr, discriminantPlane,
xDimension, yDimension, xmin, xmax, ymin, ymax, labelSize, garnish
);
GRAPHICS_EACH_END
@@ -1508,7 +1508,7 @@ DO
FORM (GRAPHICS_EACH__Discriminant_drawOneConfidenceEllipse, U"Discriminant: Draw one confidence ellipse", nullptr) {
SENTENCE (label, U"Label", U"")
POSITIVE (confidenceLevel, U"Confidence level (0-1)", U"0.95")
- BOOLEAN (discriminatPlane, U"Discriminant plane", true)
+ BOOLEAN (discriminantPlane, U"Discriminant plane", true)
INTEGER (xDimension, U"X-dimension", U"1")
INTEGER (yDimension, U"Y-dimension", U"2")
REAL (xmin, U"left Horizontal range", U"0.0")
@@ -1520,7 +1520,7 @@ FORM (GRAPHICS_EACH__Discriminant_drawOneConfidenceEllipse, U"Discriminant: Draw
OK
DO
GRAPHICS_EACH (Discriminant)
- Discriminant_drawConcentrationEllipses (me, GRAPHICS, confidenceLevel, true, label, discriminatPlane,
+ Discriminant_drawConcentrationEllipses (me, GRAPHICS, confidenceLevel, true, label, discriminantPlane,
xDimension, yDimension, xmin, xmax, ymin, ymax, labelSize, garnish
);
GRAPHICS_EACH_END
=====================================
external/espeak/speech.cpp
=====================================
@@ -528,6 +528,18 @@ static espeak_ng_STATUS Synthesize(unsigned int unique_identifier, const void *t
void MarkerEvent(int type, unsigned int char_position, int value, int value2, unsigned char *outptr)
{
+ /*
+ ppgb:
+ This function can be called only from:
+ - WavegenSetVoice(), with `type` == espeakEVENT_SAMPLERATE
+ - WavegenFill2(), with `type` is one of:
+ - espeakEVENT_SENTENCE
+ - espeakEVENT_WORD
+ - espeakEVENT_PHONEME
+ - espeakEVENT_END
+ */
+ //TRACE
+ trace (type, U" ", char_position, U" ", value, U" ", value2);
// type: 1=word, 2=sentence, 3=named mark, 4=play audio, 5=end, 7=phoneme
espeak_EVENT *ep;
double time;
=====================================
external/espeak/wavegen.cpp
=====================================
@@ -1348,16 +1348,66 @@ static int WavegenFill2(void)
result = Wavegen_Klatt(length & 0xffff, resume, (frame_t *)q[2], (frame_t *)q[3], &wdata, wvoice);
break;
#endif
- case WCMD_MARKER:
+ case WCMD_MARKER: {
marker_type = q[0] >> 8;
+ //TRACE
trace (U"marker ", marker_type, U" ", q [1], U" ", q [2], U" ", q [3]);
- if (marker_type == espeakEVENT_PHONEME)
- MarkerEvent(marker_type, q[1], * (int *) & q[2], * ((int *) & q[2] + 1), out_ptr);
+ /*
+ ppgb:
+ These are the possible marker types:
+ espeakEVENT_LIST_TERMINATED = 0, // Retrieval mode: terminates the event list.
+ espeakEVENT_WORD = 1, // Start of word
+ espeakEVENT_SENTENCE = 2, // Start of sentence
+ espeakEVENT_MARK = 3, // Mark
+ espeakEVENT_PLAY = 4, // Audio element
+ espeakEVENT_END = 5, // End of sentence or clause
+ espeakEVENT_MSG_TERMINATED = 6, // End of message
+ espeakEVENT_PHONEME = 7, // Phoneme, if enabled in espeak_Initialize()
+ espeakEVENT_SAMPLERATE = 8 // internal use, set sample rate
+ Of these:
+ - espeakEVENT_PHONEME takes all 8 bytes of the `string` branch of the union `espeak_EVENT.id` (see `speak_lib.h`),
+ which was set in DoPhonemeMarker().
+ - espeakEVENT_WORD
+ */
+ /*
+ Whether the split version occurs always or only in case of espeakEVENT_PHONEME doesn't seme to matter:
+ - here we have only WORD, SENTENCE and PHONEME (also END)
+ - WORD seems to set `id.number`, end there we do see a difference if we are on 64-bit big-endian
+ - however WORD ignores `id.number` (`id.number is used only by SAMPLE_RATE, which doesn't arrive here)
+ - yes, these assumptions are brittle
+ - so we repair only if PHONEME, although we sent a pull request to eSpeak to always split
+ - the eSpeak version will break as soom as WORD starts to interpret `id.number`.
+ */
+ /*
+ The incorrect eSpeak version:
+ */
+ //MarkerEvent(marker_type, q[1], q[2], q[3], out_ptr);
+ /*
+ The corrected eSpeak-Praat version:
+ */
+ Melder_assert (q[1] >= 0); // check that we are allowed to do a signedness conversion
+ Melder_assert (q[1] <= INT32_MAX); // check that we are allowed to convert from a 64-bit intptr_t to a 32-bit int
+ const unsigned int position = (unsigned int) q[1];
+ if (marker_type == espeakEVENT_PHONEME) {
+ MarkerEvent(marker_type, position, * (int *) & q[2], * ((int *) & q[2] + 1), out_ptr);
// ppgb-espeak: split up q [2] into two ints (eSpeak issue #1970, pull request #1973)
- else
- MarkerEvent(marker_type, q[1], q[2], q[3], out_ptr);
+ } else if (marker_type == espeakEVENT_SENTENCE) {
+ MarkerEvent(marker_type, position, 12345, 123456, out_ptr);
+ //MarkerEvent(marker_type, position, q[2], q[3], out_ptr);
+ //MarkerEvent(marker_type, position, * (int *) & q[2], * ((int *) & q[2] + 1), out_ptr);
+ } else if (marker_type == espeakEVENT_WORD) {
+ MarkerEvent(marker_type, position, 1234567, 12345678, out_ptr);
+ //MarkerEvent(marker_type, position, q[2], q[3], out_ptr);
+ //MarkerEvent(marker_type, position, * (int *) & q[2], * ((int *) & q[2] + 1), out_ptr);
+ } else if (marker_type == espeakEVENT_END) {
+ MarkerEvent(marker_type, position, 123456789, 1234567890, out_ptr);
+ //MarkerEvent(marker_type, position, q[2], q[3], out_ptr);
+ //MarkerEvent(marker_type, position, * (int *) & q[2], * ((int *) & q[2] + 1), out_ptr);
+ } else {
+ Melder_fatal (U"(WavegenFill2:) Uninterpretable marker type ", marker_type);
+ }
break;
- case WCMD_AMPLITUDE:
+ } case WCMD_AMPLITUDE:
SetAmplitude(length, (unsigned char *)q[2], q[3]);
break;
case WCMD_VOICE:
=====================================
fon/manual_scripting.cpp
=====================================
@@ -1324,8 +1324,8 @@ if you want to know what they are on your computer, try to write them into a scr
The variable `defaultDirectory$` is available for formulas in scripts; it is the folder that contains the script file.
Finally, we have `praatVersion$`, which is something like “6.4.21”."
-A disadvantage of predefined variables is that they can be changed. For this reason you are advised to use
-functions instead, if they exist:
+A disadvantage of predefined variables is that they can be changed, in which case they take on a different meaning.
+For this reason you are advised to use functions instead (if they exist), because these always have the same meaning:
- @`appVersion`() instead of `praatVersion`
- @`appVersion$`() instead of `praatVersion$`
=====================================
fon/manual_whatsnew.cpp
=====================================
@@ -29,6 +29,11 @@ R"~~~(
Latest changes in Praat.
+##6.4.22# (5 October 2024)
+• More robustness against trying to run a binary file as a script.
+• Windows Sound window: faster zooming with Ctrl-scrollwheel.
+• Windows: guarantee Explorer-type file selection windows.
+
##6.4.21# (21 September 2024)
• SpeechSynthesizer: repaired an old bug whereby ##Get phonemes from text...# could increase the duration
of a subsequent ##Play# (or ##To Sound...#).
=====================================
main/main_Praat.cpp
=====================================
@@ -50,8 +50,11 @@ int main (int argc, char *argv []) {
//TRACE
praat_setLogo (130.0, 80.0, logo);
Melder_stopwatch ();
- praat_init (U"" stringize (PRAAT_NAME), U"" stringize (PRAAT_VERSION_STR), PRAAT_VERSION_NUM,
- PRAAT_YEAR, PRAAT_MONTH, PRAAT_DAY, argc, argv);
+ praat_init (U"" stringize (PRAAT_NAME),
+ U"" stringize (PRAAT_VERSION_STR), PRAAT_VERSION_NUM,
+ PRAAT_YEAR, PRAAT_MONTH, PRAAT_DAY,
+ argc, argv
+ );
trace (Melder_stopwatch ());
INCLUDE_LIBRARY (praat_uvafon_init)
trace (Melder_stopwatch ());
=====================================
main/main_Praat.h
=====================================
@@ -18,16 +18,17 @@
/*
- These things have to be #defines so that they can be used in an automated `praat.plist` (next to in `main_Praat.cpp`).
+ These things have to be #defines so that they can be used not only in main_Praat.cpp when initializing the app,
+ but also in an automated `praat.plist` (for macOS).
To achieve this automation, go to `Build Settings` -> `Packaging` in the Praat Xcode project,
and then set `Preprocess Info.plist File` to `Yes`
- and `Info.plist Preprocessor Prefix File` to `sys/praat_version.h`.
+ and `Info.plist Preprocessor Prefix File` to `main/main_Praat.h`.
*/
#define PRAAT_NAME Praat
-#define PRAAT_VERSION_STR 6.4.21
-#define PRAAT_VERSION_NUM 6421
+#define PRAAT_VERSION_STR 6.4.22
+#define PRAAT_VERSION_NUM 6422
#define PRAAT_YEAR 2024
-#define PRAAT_MONTH 9
-#define PRAAT_DAY 24
+#define PRAAT_MONTH 10
+#define PRAAT_DAY 05
/* End of file main_Praat.h */
=====================================
main/praat.plist
=====================================
@@ -96,24 +96,6 @@
<key>NSPersistentStoreTypeKey</key>
<string>Binary</string>
</dict>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>aif</string>
- </array>
- <key>CFBundleTypeIconSystemGenerated</key>
- <integer>1</integer>
- <key>CFBundleTypeName</key>
- <string>AIF audio file</string>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- <key>LSHandlerRank</key>
- <string>Default</string>
- <key>LSTypeIsPackage</key>
- <false/>
- <key>NSPersistentStoreTypeKey</key>
- <string>Binary</string>
- </dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
=====================================
melder/melder_kar.h
=====================================
@@ -2,7 +2,7 @@
#define _melder_kar_h_
/* melder_kar.h
*
- * Copyright (C) 1992-2020 Paul Boersma
+ * Copyright (C) 1992-2020,2024 Paul Boersma
*
* This code is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -101,14 +101,17 @@ inline bool Melder_isHorizontalSpace (char32 kar) {
return kar <= kUCD_TOP_OF_LIST && (theUnicodeDatabase [kar]. features & mUCD_SPACE_SEPARATOR) != 0;
}
inline void Melder_skipHorizontalSpace (char32 **p_text) {
- while (Melder_isHorizontalSpace (**p_text)) (*p_text) ++;
+ while (Melder_isHorizontalSpace (**p_text))
+ (*p_text) ++;
}
inline char32 * Melder_findEndOfHorizontalSpace (char32 *p) {
- while (Melder_isHorizontalSpace (*p)) p ++;
+ while (Melder_isHorizontalSpace (*p))
+ p ++;
return p;
}
inline const char32 * Melder_findEndOfHorizontalSpace (const char32 *p) {
- while (Melder_isHorizontalSpace (*p)) p ++;
+ while (Melder_isHorizontalSpace (*p))
+ p ++;
return p;
}
@@ -133,10 +136,12 @@ inline bool Melder_isAsciiHorizontalOrVerticalSpace (char32 kar) {
return kar <= kUCD_TOP_OF_ASCII && (theUnicodeDatabase [kar]. features & mUCD_SEPARATOR) != 0;
}
inline void Melder_skipHorizontalOrVerticalSpace (char32 **p_text) {
- while (Melder_isHorizontalOrVerticalSpace (**p_text)) (*p_text) ++;
+ while (Melder_isHorizontalOrVerticalSpace (**p_text))
+ (*p_text) ++;
}
inline void Melder_skipHorizontalOrVerticalSpace (const char32 **p_text) {
- while (Melder_isHorizontalOrVerticalSpace (**p_text)) (*p_text) ++;
+ while (Melder_isHorizontalOrVerticalSpace (**p_text))
+ (*p_text) ++;
}
inline bool Melder_isEndOfInk (char32 kar) {
@@ -155,22 +160,27 @@ inline bool Melder_staysWithinLine (char32 kar) {
return kar <= kUCD_TOP_OF_LIST && (theUnicodeDatabase [kar]. features & mUCD_END_OF_LINE) == 0;
}
inline void Melder_skipToEndOfLine (char32 **p_text) {
- while (Melder_staysWithinLine (**p_text)) (*p_text) ++;
+ while (Melder_staysWithinLine (**p_text))
+ (*p_text) ++;
}
inline char32 * Melder_findEndOfInk (char32 *p) {
- while (Melder_staysWithinInk (*p)) p ++;
+ while (Melder_staysWithinInk (*p))
+ p ++;
return p;
}
inline const char32 * Melder_findEndOfInk (const char32 *p) {
- while (Melder_staysWithinInk (*p)) p ++;
+ while (Melder_staysWithinInk (*p))
+ p ++;
return p;
}
inline char32 * Melder_findEndOfLine (char32 *p) {
- while (Melder_staysWithinLine (*p)) p ++;
+ while (Melder_staysWithinLine (*p))
+ p ++;
return p;
}
inline const char32 * Melder_findEndOfLine (const char32 *p) {
- while (Melder_staysWithinLine (*p)) p ++;
+ while (Melder_staysWithinLine (*p))
+ p ++;
return p;
}
=====================================
sys/GuiFileSelect.cpp
=====================================
@@ -146,6 +146,7 @@ autostring32 GuiFileSelect_getOutfileName (GuiWindow optionalParent, conststring
setlocale (LC_ALL, "C");
#elif motif
OPENFILENAMEW openFileName;
+ ZeroMemory (& openFileName, sizeof (OPENFILENAMEW));
static WCHAR customFilter [100+2];
static WCHAR fullFileNameW [300+2];
wcsncpy (fullFileNameW, Melder_peek32toW_fileSystem (defaultName), 300+2);
@@ -213,6 +214,7 @@ autostring32 GuiFileSelect_getFolderName (GuiWindow optionalParent, conststring3
comInited = true;
}
static BROWSEINFO info;
+ ZeroMemory (& info, sizeof (BROWSEINFO));
info. hwndOwner = ( optionalParent && optionalParent -> d_xmShell ? (HWND) XtWindow (optionalParent -> d_xmShell) : nullptr );
info. ulFlags = BIF_USENEWUI;
info. pidlRoot = nullptr; // everything on the computer should be browsable
=====================================
sys/Interpreter.cpp
=====================================
@@ -167,7 +167,7 @@ void Melder_includeIncludeFiles (autostring32 *inout_text, bool onlyInCodeChunks
continue; // if the text starts with "include", it cannot be within a code chunk
integer braceDepth = 0;
for (const char32 *p = head; p != includeLocation; p ++)
- if (*p == U'\n') {
+ if (Melder_isEndOfLine (*p)) {
if (p [1] == U'{') {
if (braceDepth > 0)
Melder_throw (U"Opening brace within a code chunk. Don't know whether or not to include an include file.");
@@ -268,7 +268,7 @@ integer Interpreter_readParameters (Interpreter me, mutablestring32 text) {
/*
Check invariant here: we are at the beginning of a line.
*/
- Melder_assert (p == text || p [-1] == '\n');
+ Melder_assert (p == text || Melder_isEndOfLine (p [-1]));
if (scriptTextIsNotebookText) {
if (*p == U'{') {
=====================================
sys/ScriptEditor.cpp
=====================================
@@ -199,7 +199,7 @@ static void menu_cb_runSelection (ScriptEditor me, EDITOR_ARGS) {
autoPraatBackground background;
if (! MelderFile_isNull (& my file))
MelderFile_setDefaultDir (& my file);
-TRACE
+//TRACE
trace (U"<<", textPlusProcedures.string, U">>");
Interpreter_run (my interpreter.get(), textPlusProcedures.string, false);
}
=====================================
sys/motifEmulator.cpp
=====================================
@@ -2670,7 +2670,7 @@ static void on_verticalWheel (HWND window, int xPos, int yPos, int zDelta, int f
if (my widgetClass == xmDrawingAreaWidgetClass) {
const bool controlKeyPressed = ( fwKeys & MK_CONTROL );
if (controlKeyPressed)
- _GuiWinDrawingArea_handleZoom (me, double (zDelta) / 120.0);
+ _GuiWinDrawingArea_handleZoom (me, double (zDelta) / 10.0);
else if (my parent -> widgetClass == xmScrolledWindowWidgetClass)
on_scroll (my parent -> motiff.scrolledWindow.verticalBar, zDelta < 0 ? SB_LINEDOWN : SB_LINEUP, 0);
else
View it on GitLab: https://salsa.debian.org/med-team/praat/-/compare/d95c63bf32170d9092d877a1f3f4c631ce292d87...3c2934abcdf39a2f75be81f371ff82cc16f23fde
--
View it on GitLab: https://salsa.debian.org/med-team/praat/-/compare/d95c63bf32170d9092d877a1f3f4c631ce292d87...3c2934abcdf39a2f75be81f371ff82cc16f23fde
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20241009/e2b3353d/attachment-0001.htm>
More information about the debian-med-commit
mailing list