Skip to content
Snippets Groups Projects
asunder_2.9.5-monkey.patch 22.1 KiB
Newer Older
diff -ruN b/src/callbacks.c c/src/callbacks.c
--- b/src/callbacks.c	2021-06-27 15:52:48.030388633 -0500
+++ c/src/callbacks.c	2021-06-27 16:37:37.266736576 -0500
@@ -835,31 +835,6 @@
 }
 
 void
-on_rip_monkey_toggled                  (GtkToggleButton *togglebutton,
-                                        gpointer         user_data)
-{
-    if (gtk_toggle_button_get_active(togglebutton) && !program_exists("mac"))
-    {
-        GtkWidget * dialog;
-        dialog = gtk_message_dialog_new(GTK_WINDOW(win_main), 
-                                        GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, 
-                                        _("%s was not found in your path. Asunder requires it to create %s files. "
-                                        "All %s functionality is disabled."),
-                                        "'mac'", "APE", "Monkey's Audio");
-        gtk_dialog_run(GTK_DIALOG(dialog));
-        gtk_widget_destroy(dialog);
-
-        global_prefs->rip_monkey = 0;
-        gtk_toggle_button_set_active(togglebutton, global_prefs->rip_monkey);
-    }
-    
-    if (!gtk_toggle_button_get_active(togglebutton))
-        disable_monkey_widgets();
-    else
-        enable_monkey_widgets();
-}
-
-void
 on_rip_musepack_toggled                  (GtkToggleButton *togglebutton,
                                           gpointer         user_data)
 {
diff -ruN b/src/callbacks.h c/src/callbacks.h
--- b/src/callbacks.h	2021-06-27 15:54:41.446511848 -0500
+++ c/src/callbacks.h	2021-06-27 16:38:30.334820157 -0500
@@ -172,9 +172,6 @@
 on_rip_wavpack_toggled                 (GtkToggleButton *togglebutton,
                                         gpointer         user_data);
 void
-on_rip_monkey_toggled                  (GtkToggleButton *togglebutton,
-                                     gpointer         user_data);
-void
 on_rip_musepack_toggled                  (GtkToggleButton *togglebutton,
                                           gpointer         user_data);
 void
diff -ruN b/src/interface.c c/src/interface.c
--- b/src/interface.c	2021-06-27 16:00:02.926827702 -0500
+++ c/src/interface.c	2021-06-27 16:42:14.287154174 -0500
@@ -960,53 +960,6 @@
     GLADE_HOOKUP_OBJECT (prefs, rip_musepack, "rip_musepack");
     /* END MUSEPACK */
     
-    /* MONKEY */
-    GtkWidget* frame8;
-    GtkWidget* rip_monkey;
-    GtkWidget* monkeyCompression;
-    GtkWidget* monkeyVbox;
-    
-    frame8 = gtk_frame_new (NULL);
Luis Guzmán's avatar
Luis Guzmán committed
-    gtk_frame_set_shadow_type(GTK_FRAME(frame8), GTK_SHADOW_IN);
-    gtk_widget_show (frame8);
-    gtk_box_pack_start (GTK_BOX (hiddenbox), frame8, FALSE, FALSE, 0);
-    
-    alignment11 = gtk_alignment_new (0.5, 0.5, 1, 1);
-    gtk_widget_show (alignment11);
-    gtk_container_add (GTK_CONTAINER (frame8), alignment11);
-    gtk_alignment_set_padding (GTK_ALIGNMENT (alignment11), 2, 2, 12, 2);
-    
-    monkeyVbox = gtk_vbox_new (FALSE, 0);
-    gtk_widget_show (monkeyVbox);
-    gtk_container_add (GTK_CONTAINER (alignment11), monkeyVbox);
-    
-    hbox13 = gtk_hbox_new (FALSE, 0);
-    gtk_widget_show (hbox13);
-    gtk_box_pack_start (GTK_BOX (monkeyVbox), hbox13, FALSE, FALSE, 0);
-    
-    label = gtk_label_new (_("Compression level"));
-    gtk_widget_show (label);
-    gtk_box_pack_start (GTK_BOX (hbox13), label, FALSE, FALSE, 0);
-    GLADE_HOOKUP_OBJECT (prefs, label, "monkey_compression_lbl");
-    
-    monkeyCompression = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 5, 1, 1, 1)));
-    gtk_widget_show (monkeyCompression);
-    gtk_box_pack_start (GTK_BOX (hbox13), monkeyCompression, TRUE, TRUE, 5);
-    gtk_scale_set_value_pos (GTK_SCALE (monkeyCompression), GTK_POS_RIGHT);
-    gtk_scale_set_digits (GTK_SCALE (monkeyCompression), 0);
-    GLADE_HOOKUP_OBJECT (prefs, monkeyCompression, "monkey_compression_slider");
-    
-    tooltips = gtk_tooltips_new ();
-    gtk_tooltips_set_tip (tooltips, monkeyCompression, _("This does not affect the quality. Higher number means smaller file."), NULL);
-    
-    rip_monkey = gtk_check_button_new_with_mnemonic (_("Monkey's Audio (lossless compression)"));
-    gtk_widget_show (rip_monkey);
-    gtk_frame_set_label_widget (GTK_FRAME (frame8), rip_monkey);
-    g_signal_connect ((gpointer) rip_monkey, "toggled",
-                                        G_CALLBACK (on_rip_monkey_toggled),
-                                        NULL);
-    GLADE_HOOKUP_OBJECT (prefs, rip_monkey, "rip_monkey");
-    /* END MONKEY */
     label = gtk_label_new (_("Encode"));
     gtk_widget_show (label);
@@ -1424,18 +1377,6 @@
     }
 }
 
-void disable_monkey_widgets(void)
-{
-    gtk_widget_set_sensitive(lookup_widget(win_prefs, "monkey_compression_lbl"), FALSE);
-    gtk_widget_set_sensitive(lookup_widget(win_prefs, "monkey_compression_slider"), FALSE);
-}
-
-void enable_monkey_widgets(void)
-{
-    gtk_widget_set_sensitive(lookup_widget(win_prefs, "monkey_compression_lbl"), TRUE);
-    gtk_widget_set_sensitive(lookup_widget(win_prefs, "monkey_compression_slider"), TRUE);
-}
-
 void disable_musepack_widgets(void)
 {
     gtk_widget_set_sensitive(lookup_widget(win_prefs, "musepack_bitrate_lbl"), FALSE);
@@ -1847,7 +1788,7 @@
 static const char* 
 GBLcomments = 
 N_("An application to save tracks from an Audio CD \n"
-"as WAV, MP3, OGG, FLAC, Wavpack, Opus, Musepack, Monkey's Audio files.");
+"as WAV, MP3, OGG, FLAC, Wavpack, Opus and Musepack audio files.");
 
 static const char* 
 GBLcopyright = 
diff -ruN b/src/interface.h c/src/interface.h
--- b/src/interface.h	2021-06-27 16:00:37.894859872 -0500
+++ c/src/interface.h	2021-06-27 16:42:38.247188440 -0500
Luis Guzmán's avatar
Luis Guzmán committed
@@ -15,8 +15,6 @@
 void enable_opus_widgets(void);
 void disable_wavpack_widgets(void);
 void enable_wavpack_widgets(void);
-void disable_monkey_widgets(void);
-void enable_monkey_widgets(void);
 void disable_musepack_widgets(void);
 void enable_musepack_widgets(void);
Luis Guzmán's avatar
Luis Guzmán committed
 void show_aboutbox (void);
diff -ruN b/src/prefs.c c/src/prefs.c
--- b/src/prefs.c	2021-06-27 16:07:27.299217038 -0500
+++ c/src/prefs.c	2021-06-27 16:49:01.759711018 -0500
Luis Guzmán's avatar
Luis Guzmán committed
@@ -125,8 +125,6 @@
     p->wavpack_compression = 1;
     p->wavpack_hybrid = 1;
     p->wavpack_bitrate = 3;
-    p->rip_monkey = 0;
-    p->monkey_compression = 2;
     p->rip_musepack = 0;
     p->musepack_bitrate = 2;
Luis Guzmán's avatar
Luis Guzmán committed
     p->rip_opus = 0;
@@ -199,8 +197,6 @@
     gtk_range_set_value(GTK_RANGE(lookup_widget(win_prefs, "wavpack_compression")), p->wavpack_compression);
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(win_prefs, "wavpack_hybrid")), p->wavpack_hybrid);
     gtk_range_set_value(GTK_RANGE(lookup_widget(win_prefs, "wavpack_bitrate_slider")), p->wavpack_bitrate);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(win_prefs, "rip_monkey")), p->rip_monkey);
-    gtk_range_set_value(GTK_RANGE(lookup_widget(win_prefs, "monkey_compression_slider")), p->monkey_compression);
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(win_prefs, "rip_musepack")), p->rip_musepack);
     gtk_range_set_value(GTK_RANGE(lookup_widget(win_prefs, "musepack_bitrate_slider")), p->musepack_bitrate);
Luis Guzmán's avatar
Luis Guzmán committed
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(win_prefs, "rip_opus")), p->rip_opus);
@@ -236,8 +232,6 @@
         disable_wavpack_widgets();
     else
         enable_wavpack_widgets(); /* need this to potentially disable hybrid widgets */
-    if( !(p->rip_monkey) )
-        disable_monkey_widgets();
     if( !(p->rip_musepack) )
         disable_musepack_widgets();
Luis Guzmán's avatar
Luis Guzmán committed
     if (!(p->rip_opus))
@@ -296,8 +290,6 @@
     p->wavpack_compression = (int)gtk_range_get_value(GTK_RANGE(lookup_widget(win_prefs, "wavpack_compression")));
     p->wavpack_hybrid = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(win_prefs, "wavpack_hybrid")));
     p->wavpack_bitrate = (int)gtk_range_get_value(GTK_RANGE(lookup_widget(win_prefs, "wavpack_bitrate_slider")));
-    p->rip_monkey = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(win_prefs, "rip_monkey")));
-    p->monkey_compression = (int)gtk_range_get_value(GTK_RANGE(lookup_widget(win_prefs, "monkey_compression_slider")));
     p->rip_musepack = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(win_prefs, "rip_musepack")));
     p->musepack_bitrate = (int)gtk_range_get_value(GTK_RANGE(lookup_widget(win_prefs, "musepack_bitrate_slider")));
Luis Guzmán's avatar
Luis Guzmán committed
     p->rip_opus = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(win_prefs, "rip_opus")));
@@ -452,8 +444,6 @@
         fprintf(config, "%d\n", p->do_log);
         fprintf(config, "%s\n", p->cddb_server_name);
         fprintf(config, "%d\n", p->cddb_port_number);
-        fprintf(config, "%d\n", p->rip_monkey);
-        fprintf(config, "%d\n", p->monkey_compression);
         fprintf(config, "%d\n", p->rip_musepack);
         fprintf(config, "%d\n", p->musepack_bitrate);
         fprintf(config, "%d\n", p->more_formats_expanded);
@@ -626,12 +616,6 @@
             p->cddb_port_number = DEFAULT_CDDB_SERVER_PORT;
-        // this one can be 0
-        p->rip_monkey = read_line_num(fd);
-        
-        // this one can be 0
-        p->monkey_compression = read_line_num(fd);
-        
         /* used to be p->rip_aac, but no longer used */
         aCharPtr = read_line(fd);
         if (aCharPtr != NULL)
diff -ruN b/src/prefs.h c/src/prefs.h
--- b/src/prefs.h	2021-06-27 16:20:10.544156626 -0500
+++ c/src/prefs.h	2021-06-27 16:50:15.719807686 -0500
@@ -32,8 +32,6 @@
     int do_log;
     char* cddb_server_name;
     int cddb_port_number;
-    int rip_monkey;
-    int monkey_compression;
     int rip_musepack;
     int musepack_bitrate;
     int more_formats_expanded;
diff -ruN b/src/threads.c c/src/threads.c
--- b/src/threads.c	2021-06-27 16:30:39.049983041 -0500
+++ c/src/threads.c	2021-06-27 16:59:37.104253676 -0500
Luis Guzmán's avatar
Luis Guzmán committed
@@ -39,7 +39,6 @@
 static FILE * playlist_opus = NULL;
 static FILE * playlist_flac = NULL;
 static FILE * playlist_wavpack = NULL;
-static FILE * playlist_monkey = NULL;
 static FILE * playlist_musepack = NULL;
 
 /* ripping or encoding, so that can know not to clear the tracklist on eject */
Luis Guzmán's avatar
Luis Guzmán committed
@@ -60,7 +59,6 @@
 static double opus_percent;
 static double flac_percent;
 static double wavpack_percent;
-static double monkey_percent;
 static double musepack_percent;
 static int rip_tracks_completed;
 static int encode_tracks_completed;
Luis Guzmán's avatar
Luis Guzmán committed
@@ -86,14 +84,12 @@
         kill(pid, SIGKILL);
     if ((pid = wavpack_pid)    != 0)
         kill(pid, SIGKILL);
-    if ((pid = monkey_pid)     != 0)
-        kill(pid, SIGKILL);
-    if ((pid = musepack_pid)   != 0)
+   if ((pid = musepack_pid)   != 0)
Luis Guzmán's avatar
Luis Guzmán committed
         kill(pid, SIGKILL);
     
     /* wait until all the worker threads are done */
     while (cdparanoia_pid != 0 || lame_pid != 0 || oggenc_pid != 0 || 
Luis Guzmán's avatar
Luis Guzmán committed
-           opusenc_pid != 0 || flac_pid != 0 || wavpack_pid != 0 || monkey_pid != 0 ||
+           opusenc_pid != 0 || flac_pid != 0 || wavpack_pid != 0 ||
            musepack_pid != 0)
     {
         debugLog("w1");
Luis Guzmán's avatar
Luis Guzmán committed
@@ -116,8 +112,8 @@
     gdk_flush();
     working = false;
     
Luis Guzmán's avatar
Luis Guzmán committed
-    show_completed_dialog(numCdparanoiaOk + numLameOk + numOggOk + numOpusOk + numFlacOk + numWavpackOk + numMonkeyOk + numMusepackOk,
-                          numCdparanoiaFailed + numLameFailed + numOggFailed + numOpusFailed + numFlacFailed + numWavpackFailed + numMonkeyFailed + numMusepackFailed);
+    show_completed_dialog(numCdparanoiaOk + numLameOk + numOggOk + numOpusOk + numFlacOk + numWavpackOk + numMusepackOk,
+                          numCdparanoiaFailed + numLameFailed + numOggFailed + numOpusFailed + numFlacFailed + numWavpackFailed + numMusepackFailed);
 }
 
 // spawn needed threads and begin ripping
Luis Guzmán's avatar
Luis Guzmán committed
@@ -140,7 +136,6 @@
     opus_percent = 0.0;
     flac_percent = 0.0;
     wavpack_percent = 0.0;
-    monkey_percent = 0.0;
     musepack_percent = 0.0;
     rip_tracks_completed = 0;
     encode_tracks_completed = 0;
Luis Guzmán's avatar
Luis Guzmán committed
@@ -172,7 +167,7 @@
     
     // make sure there's at least one format to rip to
Luis Guzmán's avatar
Luis Guzmán committed
     if (!global_prefs->rip_wav && !global_prefs->rip_mp3 && !global_prefs->rip_ogg && !global_prefs->rip_opus &&
-        !global_prefs->rip_flac && !global_prefs->rip_wavpack && !global_prefs->rip_monkey &&
+        !global_prefs->rip_flac && !global_prefs->rip_wavpack &&
Luis Guzmán's avatar
Luis Guzmán committed
         !global_prefs->rip_musepack)
     {
         GtkWidget * dialog;
Luis Guzmán's avatar
Luis Guzmán committed
@@ -306,14 +301,6 @@
             
             free(filename);
         }
-        if (global_prefs->rip_monkey)
-        {
-            char * filename = make_filename(prefs_get_music_dir(global_prefs), albumdir, playlist, "ape.m3u");
-            
-            make_playlist(filename, &playlist_monkey);
-            
-            free(filename);
-        }
         if (global_prefs->rip_musepack)
         {
             char * filename = make_filename(prefs_get_music_dir(global_prefs), albumdir, playlist, "mpc.m3u");
Luis Guzmán's avatar
Luis Guzmán committed
@@ -338,7 +325,6 @@
     numOpusFailed = 0;
     numFlacFailed = 0;
     numWavpackFailed = 0;
-    numMonkeyFailed = 0;
     numMusepackFailed = 0;
     
     numCdparanoiaOk = 0;
Luis Guzmán's avatar
Luis Guzmán committed
@@ -347,7 +333,6 @@
     numOpusOk = 0;
     numFlacOk = 0;
     numWavpackOk = 0;
-    numMonkeyOk = 0;
     numMusepackOk = 0;
     
     ripper = g_thread_create(rip, NULL, TRUE, NULL);
@@ -533,9 +518,6 @@
Luis Guzmán's avatar
Luis Guzmán committed
     if (playlist_wavpack) 
         fclose(playlist_wavpack);
     playlist_wavpack = NULL;
-    if (playlist_monkey) 
-        fclose(playlist_monkey);
-    playlist_monkey = NULL;
     if (playlist_musepack) 
         fclose(playlist_musepack);
     playlist_musepack = NULL;
@@ -970,64 +952,6 @@
Luis Guzmán's avatar
Luis Guzmán committed
                 free(wavpackfilename);
                 free(wavpackfilename2);
             }
-            if (global_prefs->rip_monkey)
-            {
Luis Guzmán's avatar
Luis Guzmán committed
-                if (aborted)
-                {
-                    free(albumdir);
-                    free(musicfilename);
-                    free(wavfilename);
-                    free(trackartist_trimmed);
-                    free(tracktitle_trimmed);
-
-                    free(trackartist);
-                    free(tracktitle);
-                    free(tracktime);
-
-                    free(album_artist);
-                    free(album_title);
-                    free(album_genre);
-                    free(album_year);
-                    free(album_artist_trimmed);
-                    free(album_title_trimmed);
-                    free(album_genre_trimmed);
-
-                    close_playlists();
-                    return NULL;
-                }
-
-                char * monkeyfilename = make_filename(prefs_get_music_dir(global_prefs), albumdir, musicfilename, "ape");
-                snprintf(logStr, 1024, "Encoding track %d to \"%s\"\n", tracknum, monkeyfilename);
-                debugLog(logStr);
-                
-                rc = stat(monkeyfilename, &statStruct);
-                if(rc == 0)
-                {
-                    gdk_threads_enter();
-                        if(confirmOverwrite(monkeyfilename))
-                            doEncode = true;
-                        else
-                            doEncode = false;
-                    gdk_threads_leave();
-                }
-                else
-                    doEncode = true;
-                
-                if(doEncode)
-                {
-                    mac(wavfilename, monkeyfilename,
-                        int_to_monkey_int(global_prefs->monkey_compression), 
-                        &monkey_percent);
-                }
-                
-                if (playlist_monkey)
-                {
-                    fprintf(playlist_monkey, "#EXTINF:%d,%s - %s\n", (min*60)+sec, trackartist, tracktitle);
-                    fprintf(playlist_monkey, "%s\n", basename(monkeyfilename));
-                    fflush(playlist_monkey);
-                }
Luis Guzmán's avatar
Luis Guzmán committed
-                free(monkeyfilename);
-            }
             if (global_prefs->rip_musepack)
             {
Luis Guzmán's avatar
Luis Guzmán committed
                 if (aborted)
@@ -1117,7 +1041,6 @@
Luis Guzmán's avatar
Luis Guzmán committed
             opus_percent = 0.0;
             flac_percent = 0.0;
             wavpack_percent = 0.0;
-            monkey_percent = 0.0;
             musepack_percent = 0.0;
             encode_tracks_completed++;
         }
@@ -1162,7 +1085,7 @@
     
     /* wait until all the worker threads are done */
     while (cdparanoia_pid != 0 || lame_pid != 0 || oggenc_pid != 0 || 
Luis Guzmán's avatar
Luis Guzmán committed
-           opusenc_pid != 0 || flac_pid != 0 || wavpack_pid != 0 || monkey_pid != 0 ||
+           opusenc_pid != 0 || flac_pid != 0 || wavpack_pid != 0 ||
            musepack_pid != 0)
     {
         debugLog("w2");
@@ -1182,8 +1105,8 @@
Luis Guzmán's avatar
Luis Guzmán committed
         eject_disc(global_prefs->cdrom);
     }
 
-        show_completed_dialog(numCdparanoiaOk + numLameOk + numOggOk + numOpusOk + numFlacOk + numWavpackOk + numMonkeyOk + numMusepackOk,
-                              numCdparanoiaFailed + numLameFailed + numOggFailed + numOpusFailed + numFlacFailed + numWavpackFailed + numMonkeyFailed + numMusepackFailed);
Luis Guzmán's avatar
Luis Guzmán committed
+        show_completed_dialog(numCdparanoiaOk + numLameOk + numOggOk + numOpusOk + numFlacOk + numWavpackOk + numMusepackOk,
+                              numCdparanoiaFailed + numLameFailed + numOggFailed + numOpusFailed + numFlacFailed + numWavpackFailed + numMusepackFailed);
     gdk_threads_leave();
     
     return NULL;
@@ -1204,8 +1127,6 @@
         parts++;
     if(global_prefs->rip_wavpack) 
         parts++;
-    if(global_prefs->rip_monkey) 
-        parts++;
     if(global_prefs->rip_musepack) 
         parts++;
     
@@ -1250,7 +1171,7 @@
         if (parts > 1)
         {
             pencode = ((double)encode_tracks_completed/(double)tracks_to_rip) + 
-                       ((mp3_percent+ogg_percent+flac_percent+wavpack_percent+monkey_percent
+                       ((mp3_percent+ogg_percent+flac_percent+wavpack_percent
Luis Guzmán's avatar
Luis Guzmán committed
                          +opus_percent+musepack_percent) /
                         (parts-1) / tracks_to_rip);
             snprintf(sencode, 13, "%d%% (%d/%d)", (int)(pencode*100),
@@ -1287,10 +1208,10 @@
Luis Guzmán's avatar
Luis Guzmán committed
         if ((looper % 20) == 0) {
             snprintf(logStr, 1024, "completed tracks %d, rip %.2lf%%; encoded tracks %d, "
                      "mp3 %.2lf%% ogg %.2lf%% opus %.2lf%% flac %.2lf%% wavpack %.2lf%% "
-                     "monkey %.2lf%% musepack %.2lf%% aac %.2lf%%; prip %.2lf%% pencode %.2lf%%\n",
+                     "musepack %.2lf%% aac %.2lf%%; prip %.2lf%% pencode %.2lf%%\n",
Luis Guzmán's avatar
Luis Guzmán committed
                      rip_tracks_completed, rip_percent*100, encode_tracks_completed,
                      mp3_percent*100, ogg_percent*100, opus_percent*100, flac_percent*100, wavpack_percent*100,
-                     monkey_percent*100,musepack_percent*100,
+                     musepack_percent*100,
                      prip*100, pencode*100);
             debugLog(logStr);
         }
diff -ruN b/src/wrappers.c c/src/wrappers.c
--- b/src/wrappers.c	2021-06-27 16:35:20.690511295 -0500
+++ c/src/wrappers.c	2021-06-27 17:02:42.840406254 -0500
Luis Guzmán's avatar
Luis Guzmán committed
@@ -35,7 +35,6 @@
 pid_t opusenc_pid = 0;
 pid_t flac_pid = 0;
 pid_t wavpack_pid = 0;
-pid_t monkey_pid = 0;
 pid_t musepack_pid = 0;
 
 int numCdparanoiaFailed;
Luis Guzmán's avatar
Luis Guzmán committed
@@ -44,7 +43,6 @@
 int numOpusFailed;
 int numFlacFailed;
 int numWavpackFailed;
-int numMonkeyFailed;
 int numMusepackFailed;
 
 int numCdparanoiaOk;
@@ -53,7 +51,6 @@
 int numOpusOk;
 int numFlacOk;
 int numWavpackOk;
-int numMonkeyOk;
 int numMusepackOk;
 int numchildren = 0;
@@ -131,11 +128,6 @@
             wavpack_pid = 0;
             numWavpackFailed++;
         }
-        else if (pid == monkey_pid)
-        {
-            monkey_pid = 0;
-            numMonkeyFailed++;
-        }
         else if (pid == musepack_pid)
         {
             musepack_pid = 0;
@@ -175,11 +167,6 @@
             wavpack_pid = 0;
             numWavpackOk++;
         }
-        else if (pid == monkey_pid)
-        {
-            monkey_pid = 0;
-            numMonkeyOk++;
-        }
         else if (pid == musepack_pid)
         {
             musepack_pid = 0;
@@ -1158,65 +1145,6 @@
Luis Guzmán's avatar
Luis Guzmán committed
     *progress = 1;
Luis Guzmán's avatar
Luis Guzmán committed
 
-void mac(const char* wavfilename,
-         const char* monkeyfilename,
-         int compression,
-         double* progress)
-{
-    const char* args[5];
-    int fd;
-    int pos;
-    
-    pos = 0;
-    args[pos++] = "mac";
-    args[pos++] = wavfilename;
-    args[pos++] = monkeyfilename;
-    
-    char compressParam[10];
-    snprintf(compressParam, 10, "-c%d", compression);
-    args[pos++] = compressParam;
-    
-    args[pos++] = NULL;
-    
Luis Guzmán's avatar
Luis Guzmán committed
-    fd = exec_with_output(args, STDERR_FILENO, &monkey_pid, NULL);
-    
-    int size;
-    char buf[256];
-    do
-    {
-        pos = -1;
-        do
-        {
-            pos++;
-            size = read(fd, &buf[pos], 1);
-            
-            if (size == -1 && errno == EINTR)
-            /* signal interrupted read(), try again */
-            {
-                pos--;
-                size = 1;
-            }
-            
Luis Guzmán's avatar
Luis Guzmán committed
-        } while ((buf[pos] != '\r') && (buf[pos] != '\n') && (size > 0) && (pos < 255));
-        buf[pos] = '\0';
-        
-        double percent;
-        if (sscanf(buf, "Progress: %lf", &percent) == 1)
-        {
-            *progress = percent / 100;
-        }
-    } while (size > 0);
-    
-    close(fd);
-    /* don't go on until the signal for the previous call is handled */
-    while (monkey_pid != 0)
-    {
Luis Guzmán's avatar
Luis Guzmán committed
-        debugLog("w9\n");
-        usleep(100000);
-    }
Luis Guzmán's avatar
Luis Guzmán committed
-    *progress = 1;
Luis Guzmán's avatar
Luis Guzmán committed
-
 // uses mpcenc to encode a WAV file into a .mpc and tag it
 //
 // tracknum - the track number
diff -ruN b/src/wrappers.h c/src/wrappers.h
--- b/src/wrappers.h	2021-06-27 16:36:17.366606719 -0500
+++ c/src/wrappers.h	2021-06-27 17:03:50.812466083 -0500
Luis Guzmán's avatar
Luis Guzmán committed
@@ -7,7 +7,6 @@
 extern pid_t opusenc_pid;
 extern pid_t flac_pid;
 extern pid_t wavpack_pid;
-extern pid_t monkey_pid;
 extern pid_t musepack_pid;
 
 extern int numCdparanoiaFailed;
Luis Guzmán's avatar
Luis Guzmán committed
@@ -16,7 +15,6 @@
 extern int numOpusFailed;
 extern int numFlacFailed;
 extern int numWavpackFailed;
-extern int numMonkeyFailed;
 extern int numMusepackFailed;
 
 extern int numCdparanoiaOk;
Luis Guzmán's avatar
Luis Guzmán committed
@@ -25,7 +23,6 @@
 extern int numOpusOk;
 extern int numFlacOk;
 extern int numWavpackOk;
-extern int numMonkeyOk;
 extern int numMusepackOk;
 
 // signal handler to find out when out child has exited
Luis Guzmán's avatar
Luis Guzmán committed
@@ -167,11 +164,6 @@
              int bitrate,
              double * progress);
 
Luis Guzmán's avatar
Luis Guzmán committed
-void mac(const char* wavfilename,
-         const char* monkeyfilename,
-         int compression,
-         double* progress);
-
Luis Guzmán's avatar
Luis Guzmán committed
 // uses mpcenc to encode a WAV file into a .mpc and tag it
 //
 // tracknum - the track number