OSDN Git Service

Handle sfz instruments in mixing
authorStarg <starg@users.osdn.me>
Tue, 13 Mar 2018 14:42:18 +0000 (23:42 +0900)
committerStarg <starg@users.osdn.me>
Tue, 13 Mar 2018 14:42:18 +0000 (23:42 +0900)
interface/ncurs_c.c
timidity/mix.c
timidity/thread_mix.c

index fee22ac..42e6a99 100644 (file)
@@ -685,6 +685,18 @@ static void init_trace_window_chan(int ch)
                        wprintw(dftwin, "(%s)", prog->comment);
                }
 #endif
+#ifdef ENABLE_SFZ
+               else if(type == INST_SFZ)
+               {
+                       if (prog->name)
+                       {
+                               waddch(dftwin, ' ');
+                               waddstr(dftwin, prog->name);
+                       }
+                       if (prog->comment != NULL)
+                               wprintw(dftwin, "(%s)", prog->comment);
+               }
+#endif
     }
     }
     }
index 7192027..319ff11 100644 (file)
@@ -559,6 +559,9 @@ void mix_voice(DATA_T *buf, int v, int32 c)
        case INST_SF2:
        case INST_MOD:
        case INST_PCM:
+#ifdef ENABLE_SFZ
+       case INST_SFZ:
+#endif
                if(opt_resample_over_sampling){
                        int32 c2 = c * opt_resample_over_sampling;
                        resample_voice(v, sp, c2);
index a41f587..0a45a40 100644 (file)
@@ -402,6 +402,9 @@ void mix_voice_thread(DATA_T *buf, int v, int32 c, int thread)
        case INST_SF2:
        case INST_MOD:
        case INST_PCM:
+#ifdef ENABLE_SFZ
+       case INST_SFZ:
+#endif
                if(opt_resample_over_sampling){
                        int32 c2 = c * opt_resample_over_sampling;
                        resample_voice(v, sp, c2);