Change TYPE to METHOD 25/294325/5 accepted/tizen/unified/20230621.023255
authorJaechul Lee <jcsing.lee@samsung.com>
Fri, 16 Jun 2023 05:43:32 +0000 (14:43 +0900)
committerJaechul Lee <jcsing.lee@samsung.com>
Tue, 20 Jun 2023 04:51:32 +0000 (13:51 +0900)
audio_effect_type_e has been changed to audio_effect_method_e.

[Version] 15.0.44
[Issue Type] Update

Change-Id: Ia0e3ddfca0346addfb3de6e7fe317f613ae347d1
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
packaging/pulseaudio-modules-tizen.spec
src/preprocessor/processor-def.h
src/preprocessor/processor.c
src/preprocessor/processor.h

index 25e4812..58285ec 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          15.0.43
+Version:          15.0.44
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
@@ -24,7 +24,6 @@ BuildRequires:    pkgconfig(libsystemd)
 BuildRequires:    pkgconfig(dns_sd)
 BuildRequires:    pkgconfig(hal-api-audio)
 BuildRequires:    pkgconfig(speexdsp)
-BuildRequires:    pkgconfig(rnnoise)
 BuildRequires:    pkgconfig(webrtc-audio-processing)
 BuildRequires:    pkgconfig(libaudio-effect)
 BuildRequires:    pulseaudio
index 5f897f9..bf24164 100644 (file)
@@ -1,7 +1,7 @@
 /***
   This file is part of PulseAudio.
 
-  Copyright 2021 Jaechul Lee <jcsing.lee@samsung.com>
+  Copyright 2023 Jaechul Lee <jcsing.lee@samsung.com>
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
index 7e96446..e0ff03e 100644 (file)
@@ -1,7 +1,7 @@
 /***
   This file is part of PulseAudio.
 
-  Copyright 2021 Jaechul Lee <jcsing.lee@samsung.com>
+  Copyright 2023 Jaechul Lee <jcsing.lee@samsung.com>
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
@@ -67,24 +67,24 @@ static pa_usec_t pa_processor_frame_to_usec(size_t frame, pa_sample_spec *spec)
     return pa_bytes_to_usec(pa_frame_size(spec) * frame, spec);
 }
 
-static int pa_processor_convert_method(pa_processor_method_t method, audio_effect_type_e *type) {
+static int pa_processor_convert_method(pa_processor_method_t method, audio_effect_method_e *audio_effect_method) {
     int ret = 0;
 
     switch (method) {
         case PROCESSOR_METHOD_SPEEX:
-            *type = AUDIO_EFFECT_TYPE_AEC_SPEEX;
+            *audio_effect_method = AUDIO_EFFECT_METHOD_AEC_SPEEX;
             break;
         case PROCESSOR_METHOD_WEBRTC:
-            *type = AUDIO_EFFECT_TYPE_AEC_WEBRTC;
+            *audio_effect_method = AUDIO_EFFECT_METHOD_AEC_WEBRTC;
             break;
         case PROCESSOR_METHOD_REFERENCE_COPY:
-            *type = AUDIO_EFFECT_TYPE_AEC_REFCOPY;
+            *audio_effect_method = AUDIO_EFFECT_METHOD_AEC_REFCOPY;
             break;
         case PROCESSOR_METHOD_RNNOISE:
-            *type = AUDIO_EFFECT_TYPE_NS_RNNOISE;
+            *audio_effect_method = AUDIO_EFFECT_METHOD_NS_RNNOISE;
             break;
         case PROCESSOR_METHOD_NONE_PSE:
-            *type = AUDIO_EFFECT_TYPE_NS_PSE;
+            *audio_effect_method = AUDIO_EFFECT_METHOD_NS_PSE;
             break;
         default:
             ret = -1;
@@ -129,7 +129,7 @@ pa_processor *pa_processor_new(pa_core *core,
     pa_memchunk silence;
     size_t process_framesize;
 
-    audio_effect_type_e type;
+    audio_effect_method_e audio_effect_method;
     audio_effect_format_e format;
 
     pa_assert(core);
@@ -144,20 +144,25 @@ pa_processor *pa_processor_new(pa_core *core,
     processor->process_frames = pa_processor_usec_to_frame(processor->process_usec, &processor->ss);
     processor->process_bytes = pa_usec_to_bytes(processor->process_usec, &processor->ss);
 
-    if (pa_processor_convert_method(method, &type) < 0) {
-        pa_log_error("Failed to convert audio-effect type. method(%d), type(%d)", method, type);
+    if (pa_processor_convert_method(method, &audio_effect_method) < 0) {
+        pa_log_error("Failed to convert audio-effect method. method(%d), audio_effect_method(%d)",
+                        method, audio_effect_method);
         return NULL;
     }
 
     if (pa_processor_convert_format(ss->format, &format) < 0) {
-        pa_log_error("Failed to convert audio-effect format. format(%d), audio_effect_format(%d)", ss->format, format);
+        pa_log_error("Failed to convert audio-effect format. format(%d), audio_effect_format(%d)",
+                        ss->format, format);
         return NULL;
     }
 
-    processor->audio_effect = audio_effect_create(type, ss->rate, ss->channels, format, processor->process_frames);
+    processor->audio_effect = audio_effect_create(audio_effect_method, ss->rate, ss->channels,
+                                                    format, processor->process_frames);
     if (!processor->audio_effect) {
-        pa_log_error("Failed to create audio effect. type(%d), rate(%d), ch(%d), format(%d), frames(%zu)",
-                        type, ss->rate, ss->channels, format, processor->process_frames);
+        pa_log_error("Failed to create audio effect. audio_effect_method(%d), "
+                        "rate(%d), ch(%d), format(%d), frames(%zu)",
+                        audio_effect_method, ss->rate, ss->channels,
+                        format, processor->process_frames);
         return NULL;
     }
 
@@ -183,12 +188,13 @@ pa_processor *pa_processor_new(pa_core *core,
                                                     &silence);
     pa_memblock_unref(silence.memblock);
 
-    pa_log_info("Created processor. memblockq rate(%d), channels(%d), process_msec(%u), process_bytes(%zu), method(%d)",
-                                                    processor->ss.rate,
-                                                    processor->ss.channels,
-                                                    process_msec,
-                                                    pa_usec_to_bytes(processor->process_usec, &processor->ss),
-                                                    method);
+    pa_log_info("Created processor. memblockq rate(%d), channels(%d), "
+                "process_msec(%u), process_bytes(%zu), method(%d)",
+                            processor->ss.rate,
+                            processor->ss.channels,
+                            process_msec,
+                            pa_usec_to_bytes(processor->process_usec, &processor->ss),
+                            method);
 
     debug_open_file(processor);
 
index 599d27b..c4bb54f 100644 (file)
@@ -1,7 +1,7 @@
 /***
   This file is part of PulseAudio.
 
-  Copyright 2021 Jaechul Lee <jcsing.lee@samsung.com>
+  Copyright 2023 Jaechul Lee <jcsing.lee@samsung.com>
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published