Audio parameter adjustment method and electronic device

CN122672742BActive Publication Date: 2026-10-09GOERTEK INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611062895.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-10-09
Estimated Expiration
2046-07-17

AI Technical Summary

Technical Problem

[0004]本公开实施例的一个目的是提供一种音频参数调节的新的技术方案,以解决相关技术中存在的音频参数访问需要编写大量嵌套访问代码、用户界面控件与音频参数数据之间的同步需要手动维护容易出错、不同模块采用不同的参数访问方式难以统一管理、高频参数修改场景下频繁的数据写入操作导致大量输入输出操作影响系统性能的技术问题

Benefits of technology

[0015]This embodiment establishes a unified mapping between user interface controls and the memory storage location of audio parameters by associating each audio parameter adjustment control with a parameter location path and parameter update synchronization mode. This eliminates the need to write independent nested access code for different parameters, simplifying parameter access. Furthermore, by employing corresponding write strategies based on different parameter update synchronization modes, flexible selection between real-time synchronization, anti-jitter synchronization, and manual synchronization can be achieved. This satisfies real-time feedback requirements while optimizing the number of input/output operations in high-frequency parameter modification scenarios, improving the convenience and efficiency of audio parameter adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122672742B_ABST
    Figure CN122672742B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an audio parameter adjustment method and an electronic device. The method comprises: displaying an audio parameter adjustment interface, the audio parameter adjustment interface comprising at least one audio parameter adjustment control; in a case where a user performs an adjustment operation on a target audio parameter adjustment control in the at least one audio parameter adjustment control, determining, in response to the adjustment operation, a current value output by the target audio parameter adjustment control; determining, according to a target parameter positioning path associated with the target audio parameter adjustment control, a target parameter node pointed to by the target parameter positioning path in an audio parameter memory; and writing, according to a target parameter update synchronization mode associated with the target audio parameter adjustment control, the current value into the target parameter node according to a writing strategy corresponding to the target parameter synchronization mode associated with the target audio parameter adjustment control. The method can improve the convenience and efficiency of audio parameter adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of audio parameter processing technology, and more specifically, to an audio parameter adjustment method and an electronic device. Background Technology

[0002] In audio parameter configuration systems, audio algorithm parameter data is typically stored using a nested JSON structure, containing multiple levels of audio algorithm parameters. For example, an EQ equalizer configuration might include multiple frequency bands, each with sub-parameters such as frequency, gain, and Q value. In this nested structure, parameter access requires writing a large amount of nested access code, resulting in poor code readability and maintenance difficulties. Furthermore, synchronization between user interface controls and audio parameter data requires manual maintenance, which is prone to errors. In addition, different modules use different parameter access methods, making unified management difficult.

[0003] In scenarios involving high-frequency parameter modification, frequent data write operations lead to a large number of input / output operations, impacting system performance. Therefore, there is a need to simplify parameter access methods, achieve efficient synchronization between user interface controls and audio parameter data, and optimize system performance in scenarios involving high-frequency parameter modification. Summary of the Invention

[0004] One objective of this disclosure is to provide a new technical solution for audio parameter adjustment, in order to solve the technical problems existing in the related art, such as the need to write a large amount of nested access code for audio parameter access, the need for manual maintenance of synchronization between user interface controls and audio parameter data which is prone to errors, the difficulty in unified management of different parameter access methods used by different modules, and the impact of a large number of input and output operations on system performance due to frequent data write operations in high-frequency parameter modification scenarios.

[0005] According to a first aspect of the present disclosure, an audio parameter adjustment method is provided, comprising: The audio parameter adjustment interface is displayed. The audio parameter adjustment interface includes at least one audio parameter adjustment control. Each audio parameter adjustment control is associated with a parameter positioning path and a parameter update synchronization mode. The parameter positioning path is used to indicate the storage location of the current value output by the audio parameter adjustment control in the audio parameter memory. The parameter update synchronization mode is used to indicate the synchronization mode used when the current value output by the audio parameter adjustment control is written to the audio parameter memory. Upon receiving an adjustment operation performed by a user on a target audio parameter adjustment control in at least one audio parameter adjustment control, the current value output by the target audio parameter adjustment control is determined in response to the adjustment operation; Based on the target parameter positioning path associated with the target audio parameter adjustment control, determine the target parameter node that the target parameter positioning path points to in the audio parameter memory; According to the target parameter update synchronization mode associated with the target audio parameter adjustment control, the current value is written to the target parameter node according to the writing strategy corresponding to the target parameter synchronization mode associated with the target audio parameter adjustment control.

[0006] Optionally, the target parameter update synchronization mode is an instant synchronization mode, and the step of writing the current value to the target parameter node according to the writing strategy corresponding to the target parameter update synchronization mode based on the target audio parameter adjustment control includes: Write the current value to the memory address corresponding to the target parameter node in the audio parameter memory.

[0007] Optionally, the target parameter update synchronization mode is an anti-shake synchronization mode, and the step of writing the current value to the target parameter node according to the writing strategy corresponding to the target parameter update synchronization mode based on the target audio parameter adjustment control includes: The current value and the target parameter location path are stored as an entry in the anti-shake storage hash table, and the stable duration timer is started with the current time as the starting time; wherein, the anti-shake storage hash table is used to store the value to be written to the audio parameter memory, and the anti-shake storage hash table includes at least one entry, each entry containing a parameter location path and the value to be written corresponding to the parameter location path; If an updated value corresponding to the target parameter positioning path is received during the period when the stable duration timer has not reached the set duration, the value corresponding to the target parameter positioning path in the anti-shake storage hash table is updated according to the updated value, and the stable duration timer is restarted with the current time as the starting time. When the stable duration reaches the set duration, other write operations are prohibited from accessing the audio parameter memory. All entries in the anti-shake storage hash table are traversed, and the corresponding target parameter node is determined according to the target parameter positioning path in each entry. The values ​​in each entry are written in batches to the memory address of the corresponding target parameter node in the audio parameter memory. After the write operation is complete, other write operations are allowed to access the audio parameter memory, and the anti-shake storage hash table is cleared.

[0008] Optionally, the target parameter update synchronization mode is a manual synchronization mode. The step of writing the current value to the target parameter node according to the writing strategy corresponding to the target parameter update synchronization mode, based on the target audio parameter adjustment control and its associated target parameter update synchronization mode, includes: Store the current value and the target parameter location path in the manual submission cache area, and prohibit writing the current value to the audio parameter memory; Upon receiving a confirmation submission command from the user, all entries in the manual submission buffer are traversed, the corresponding target parameter node is determined based on the parameter location path in each entry, and the values ​​in each entry are written in batches to the memory address of the corresponding target parameter node in the audio parameter memory. After writing is complete, clear the manual commit cache.

[0009] Optionally, determining the target parameter node pointed to by the parameter positioning path in the audio parameter memory based on the parameter positioning path associated with the target audio parameter adjustment control includes: Using a set character as a delimiter, the parameter positioning path is divided into a sequence of path segments, and the current positioning pointer is set to point to the root node of the audio parameter memory; Traverse each path segment in the sequence of path segments in order; If the path segment being traversed does not contain an array index identifier, the current positioning pointer is moved from the current node to the child node under the current node that matches the name of the path segment; If the currently traversed path segment contains an array index identifier, extract the index value from the path segment, move the current positioning pointer from the current node to the array under the current node that matches the path segment name, and move it to the element position in the array corresponding to the index value. Repeat the above steps until all path segments in the path segment sequence have been traversed, and determine the node pointed to by the current positioning pointer as the target parameter node pointed to by the parameter positioning path in the audio parameter memory.

[0010] Optionally, after writing the current value to the target parameter node according to the write strategy corresponding to the target parameter update synchronization mode, the method further includes: Once the writing is complete, the mapping relationship is queried using the memory address of the target parameter node as the key to obtain the set of audio parameter adjustment controls associated with the target parameter node; Read the updated value from the memory address of the target parameter node; Iterate through each audio parameter adjustment control in the set of audio parameter adjustment controls, and write the updated value into the display buffer of each audio parameter adjustment control.

[0011] Optionally, the audio parameter adjustment control is at least one of a slider control, a rotary knob control, and a numeric input box control.

[0012] Optionally, the audio parameter adjustment interface includes: Obtain the root node data and mapping configuration file of the audio parameter memory; the audio parameter memory stores the current values ​​of the audio parameters in a tree structure, and the mapping configuration file contains at least one mapping relationship, each mapping relationship including the correspondence between the audio parameter adjustment control, the parameter positioning path, and the parameter update synchronization mode; For each mapping relationship in the mapping relationship configuration file, the memory address of the parameter node pointed to by the parameter positioning path in the audio parameter memory is determined according to the parameter positioning path in the mapping relationship. The currently stored value is read from the memory address, and the value is written into the display buffer of the corresponding audio parameter adjustment control according to the audio parameter adjustment control in the mapping relationship. After traversing all mapping relationships in the mapping relationship configuration file, each audio parameter adjustment control is rendered and presented at the corresponding position in the audio parameter adjustment interface according to the value in the display buffer of each audio parameter adjustment control.

[0013] Optionally, upon receiving an adjustment operation performed by a user on a target audio parameter adjustment control among the at least one audio parameter adjustment controls, determining the current value output by the target audio parameter adjustment control in response to the adjustment operation includes: Upon receiving a numerical change interruption signal, the target audio parameter adjustment control is determined based on the audio parameter adjustment control identification information carried by the numerical change interruption signal, and the current value output by the target audio parameter adjustment control is determined based on the changed value carried by the numerical change interruption signal; the numerical change interruption signal is generated by the numerical change monitoring callback function of the target audio parameter adjustment control based on the user's adjustment operation.

[0014] According to a second aspect of the present disclosure, an electronic device is also provided, including a memory and a processor, the memory being used to store a computer program; the processor being used to execute the computer program to implement the method according to the first aspect of the present disclosure.

[0015] This embodiment establishes a unified mapping between user interface controls and the memory storage location of audio parameters by associating each audio parameter adjustment control with a parameter location path and parameter update synchronization mode. This eliminates the need to write independent nested access code for different parameters, simplifying parameter access. Furthermore, by employing corresponding write strategies based on different parameter update synchronization modes, flexible selection between real-time synchronization, anti-jitter synchronization, and manual synchronization can be achieved. This satisfies real-time feedback requirements while optimizing the number of input / output operations in high-frequency parameter modification scenarios, improving the convenience and efficiency of audio parameter adjustment.

[0016] Other features and advantages of the embodiments of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the disclosure.

[0018] Figure 1 This is a schematic diagram of the structure of an electronic device to which the methods of the embodiments of this disclosure can be applied.

[0019] Figure 2 This is a flowchart illustrating an audio parameter adjustment method provided in an embodiment of this disclosure. Detailed Implementation

[0020] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.

[0021] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the scope of this disclosure or its application or use.

[0022] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0023] In all the examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0024] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0025] It should be noted that all data acquisition actions in this disclosure were carried out in compliance with the relevant data protection laws and policies of the country where the data is located, and with the authorization of the relevant equipment owner.

[0026] This disclosure relates to an audio parameter adjustment scheme. Figure 1 This is a schematic diagram of the structure of an electronic device to which the methods of the embodiments of this disclosure can be applied.

[0027] like Figure 1 As shown, the electronic device 100 can be an embedded audio device, an audio processor, a digital audio workstation, or a computing device with audio processing capabilities (such as a mobile phone, computer, etc.), and there is no limitation here.

[0028] Electronic device 100 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, etc. The processor 1100 may be a central processing unit (CPU), a microprocessor (MCU), etc. The memory 1200 may include, for example, ROM (Read-Only Memory), RAM (Random Access Memory), or non-volatile memory such as a hard disk. The interface device 1300 may include, for example, a USB interface, a headphone jack, etc. The communication device 1400 may be capable of wired or wireless communication. The display device 1500 may be, for example, an LCD screen, a touch screen, etc. The input device 1600 may include, for example, a touch screen, a keyboard, etc. Users can input / output voice information through the speaker 1700 and the microphone 1800.

[0029] In addition, the memory 1200 also includes audio parameter memory, which organizes and stores various parameter data of the audio algorithm in a tree structure. Specifically, the parameter data is usually stored using a nested JSON structure, forming a multi-level parameter tree. For example, an EQ equalizer configuration may contain multiple frequency bands, each with corresponding sub-parameters such as frequency, gain, and Q value. This data is stored in the audio parameter memory for the processor to read and write at any time during runtime.

[0030] In related technologies, one possible implementation is to write an independent access method for each parameter, access the parameter value through multi-level nested code, and manually maintain the synchronization relationship between the user interface controls and the parameter data.

[0031] This approach has the following problems: First, because parameter data is typically stored in a nested structure, accessing each parameter requires writing a large amount of nested code, resulting in a massive amount of code, poor readability, and difficult maintenance. Second, the synchronization between user interface controls and parameter data relies entirely on manual coding, which not only increases development workload but also makes the system highly susceptible to data inconsistencies due to human error. Third, different modules often use their own independent parameter access methods, lacking a unified access standard, further increasing the overall management difficulty of the system. Furthermore, in scenarios involving high-frequency parameter adjustments, frequent parameter modifications trigger a large number of data write operations, causing excessive input / output load and impacting system responsiveness.

[0032] To address this, this embodiment establishes a unified mapping between user interface controls and the memory storage locations of audio parameters by associating each audio parameter adjustment control with a parameter location path and a parameter update synchronization mode. It employs a unified path access format to support array indexing and nested attribute access, eliminating the need to write separate nested access code for different parameters and simplifying parameter access. Furthermore, it adopts corresponding write strategies based on different parameter update synchronization modes, allowing flexible selection between real-time synchronization, anti-jitter synchronization, and manual synchronization. This satisfies real-time feedback requirements while optimizing the number of input / output operations in high-frequency parameter modification scenarios, thus improving the convenience and efficiency of audio parameter adjustment.

[0033] Despite Figure 1 The electronic device 100 shows multiple devices, but this application may only involve some of them. For example, electronic device 100 may only involve memory 1200 and processor 1100.

[0034] In the embodiments applied in this application, the memory 1200 of the electronic device 100 is used to store instructions for controlling the processor 1100 to execute the audio parameter adjustment method provided in the embodiments of this application.

[0035] In the above description, those skilled in the art can design instructions based on the scheme disclosed in this application. How the instructions control the processor to operate is well known in the art, and therefore will not be described in detail here.

[0036] <First Embodiment> Figure 2 This is a flowchart illustrating an audio parameter adjustment method provided in an embodiment of this disclosure. Figure 2 As shown, the method includes the following steps S210 to S240.

[0037] Step S210: Display the audio parameter adjustment interface. The audio parameter adjustment interface includes at least one audio parameter adjustment control. Each audio parameter adjustment control is associated with a parameter positioning path and a parameter update synchronization mode. The parameter positioning path is used to indicate the storage location of the current value output by the audio parameter adjustment control in the audio parameter memory. The parameter update synchronization mode is used to indicate the synchronization mode used when the current value output by the audio parameter adjustment control is written to the audio parameter memory.

[0038] In this embodiment, the electronic device displays an audio parameter adjustment interface. The audio parameter adjustment interface includes at least one audio parameter adjustment control. The audio parameter adjustment control refers to the interactive control in the audio parameter adjustment interface used to adjust the audio parameter values. The audio parameter adjustment control can act as an interactive bridge between the user and the audio parameter memory. The user inputs the desired parameter value by operating the audio parameter adjustment control, and the electronic device writes the value to the corresponding location in the audio parameter memory according to the parameter location path associated with the audio parameter adjustment control, thereby realizing parameter configuration.

[0039] Audio parameter adjustment controls can take many forms, and no specific form is specified here.

[0040] In some examples, the audio parameter adjustment control can be at least one of a slider control, a rotary knob control, or a numeric input box control. Slider controls are suitable for continuous parameter adjustment, rotary knob controls are suitable for simulating the operation of a physical knob, and numeric input box controls are suitable for precise numerical input. By providing multiple forms of audio parameter adjustment controls, different parameter types and user operating habits can be accommodated.

[0041] In other examples, the audio parameter adjustment control can also be at least one of a drop-down menu control, a checkbox control, or a radio button control. Drop-down menu controls are suitable for selecting enumerated type parameters, checkbox controls are suitable for controlling the on / off state of Boolean type parameters, and radio button controls are suitable for selecting mutually exclusive options. By adopting these control forms, the interactive methods of the user interface can be further enriched, and the user experience can be improved.

[0042] The parameter location path refers to the path string used to locate the parameter node corresponding to the audio parameter adjustment control in the audio parameter memory.

[0043] The parameter location path is used to establish a mapping relationship between audio parameter adjustment controls and the storage location of the audio parameter in the audio parameter memory. The parameter location path allows you to locate the parameter node in the audio parameter memory that needs to be read or written, thereby achieving data synchronization between the audio parameter adjustment controls and the audio parameter memory. The parameter location path is determined by specifying a path string for each audio parameter adjustment control in the mapping relationship configuration file.

[0044] The audio parameter memory stores the current values ​​of the audio parameters in a tree structure, and the parameter location path uses a uniform path format to represent the position of the audio parameter in the tree structure.

[0045] For example, the parameter location path can use a " / " separated format, such as "audio / eq / bands / 0 / frequency", where "audio" represents the root node of the audio parameters, "eq" represents the equalizer parameter node, "bands" represents the band array node, "0" represents the first element in the array, and "frequency" represents the frequency parameter node for that band. Using this parameter location path, the location in the audio parameters memory where the frequency parameters of the first band of the EQ equalizer are stored can be determined.

[0046] For example, parameter location paths can also support more complex nested structures. For instance, the parameter location path "audio / compressor / sidechain / filter / type" can locate the sidechain filter type parameter of the compressor module in the audio parameter memory. The parameter location path "audio / reverb / earlyReflections / delays / 2" can locate the third element in the early reflection delay array of the reverb module. By using a unified path format, accessing nested parameters can be simplified.

[0047] The parameter update synchronization mode refers to the synchronization strategy used when the current value output by the audio parameter adjustment control is written to the audio parameter memory.

[0048] The parameter update synchronization mode is determined by specifying a parameter update synchronization mode for each audio parameter adjustment control in the mapping relationship configuration file, which supports global configuration and local overriding.

[0049] In some examples, parameter update synchronization modes include three types: instant synchronization, anti-shake synchronization, and manual synchronization. Each audio parameter adjustment control corresponds to one type of parameter update synchronization mode. Instant synchronization mode is suitable for scenarios requiring real-time feedback, writing the parameter to the audio parameter memory immediately each time it changes. Anti-shake synchronization mode is suitable for high-frequency update scenarios, such as when the user drags the slider for continuous adjustment; a stable duration timing mechanism merges multiple parameter changes into a single batch write operation. Manual synchronization mode is suitable for important configuration changes; the batch write operation is only performed after the user explicitly inputs a confirmation command. Based on this example, for multiple audio parameter adjustment controls in the audio parameter adjustment interface, different parameter update synchronization modes can be configured for different audio parameter adjustment controls. If the audio parameter adjustment interface includes a volume control, an equalizer band parameter adjustment control, and an audio algorithm type selection control: For the volume control requiring real-time feedback, configure it as instant synchronization mode. For the equalizer band parameter adjustment control requiring frequent adjustment, configure it as anti-shake synchronization mode. For the important audio algorithm type selection control, configure it as manual synchronization mode. By using a hybrid synchronization mode, real-time performance and performance can be balanced in different scenarios.

[0050] In some embodiments, step S210, which displays the audio parameter adjustment interface, includes the following steps S2111 to S2113.

[0051] Step S2111: Obtain the root node data and mapping relationship configuration file of the audio parameter memory. The audio parameter memory stores the current values ​​of the audio parameters in a tree structure. The mapping relationship configuration file contains at least one mapping relationship. Each mapping relationship includes the correspondence between the audio parameter adjustment control, the parameter positioning path, and the parameter update synchronization mode.

[0052] In this embodiment, the mapping configuration file establishes the binding relationship between audio parameter adjustment controls and parameter nodes in the audio parameter memory. Each mapping relationship contains three core elements: audio parameter adjustment controls, which are user-interactive interface elements (such as sliders, knobs, confirmation buttons, etc.) used to receive user adjustments to a certain audio parameter; parameter location path, which is the address of the target parameter node in the tree-structured audio parameter memory, uniquely identified by a specific format (such as a hierarchical path separated by slashes, e.g., "audio / eq / bands / 0 / gain"); and parameter update synchronization mode, which is the strategy used to write the current value to the audio parameter memory when the control value changes, including three selectable modes: instant synchronization (immediate writing), anti-jitter synchronization (delayed writing after merging high-frequency operations), and manual synchronization (writing after waiting for user confirmation). By configuring the above three elements, the interactive behavior of each control can be flexibly defined.

[0053] By configuring the mapping relationship, differentiated synchronization strategies can be implemented for different operational characteristics, which not only ensures the smoothness of adjustment, but also takes into account data security and system performance.

[0054] Step S2112: For each mapping relationship in the mapping relationship configuration file, determine the memory address of the parameter node pointed to by the parameter positioning path in the audio parameter memory according to the parameter positioning path in the mapping relationship, read the currently stored value from the memory address, and write the value into the display buffer of the corresponding audio parameter adjustment control according to the audio parameter adjustment control in the mapping relationship.

[0055] Step S2113: After traversing all mapping relationships in the mapping relationship configuration file, render and present each audio parameter adjustment control at the corresponding position in the audio parameter adjustment interface according to the value in the display buffer of each audio parameter adjustment control.

[0056] For example, the mapping configuration file can contain a mapping that specifies a slider fader control associated with the parameter location path "audio / eq / bands / 0 / frequency" and the instant synchronization mode. The frequency parameter value corresponding to this path, such as 1000Hz, is read from the audio parameter memory and written to the slider fader control's display buffer, causing the slider fader control to display the current frequency as 1000Hz on the interface. Simultaneously, the mapping configuration file can also contain another mapping that specifies a numeric input box control also associated with the parameter location path "audio / eq / bands / 0 / frequency" and the instant synchronization mode, similarly writing 1000Hz to the numeric input box control's display buffer, causing both controls to display a frequency of 1000Hz on the interface.

[0057] As can be seen from steps S2111 to S2113 above, by establishing a binding relationship between the audio parameter adjustment control and the parameter node in the audio parameter memory through the mapping relationship configuration file, when the audio parameter adjustment interface is displayed, the current value in the audio parameter memory is read according to the parameter positioning path in the mapping relationship configuration file and written to the display buffer of the corresponding audio parameter adjustment control, which can realize the initialization of the user interface control and ensure that the parameter value displayed on the audio parameter adjustment interface is consistent with the value stored in the audio parameter memory.

[0058] Step S220: Upon receiving an adjustment operation performed by a user on a target audio parameter adjustment control in at least one audio parameter adjustment control, in response to the adjustment operation, determine the current value output by the target audio parameter adjustment control.

[0059] In this embodiment, the adjustment operation refers to the parameter value change operation performed by the user on the audio parameter adjustment control.

[0060] The adjustment operation is determined by setting a value change listener callback function for the audio parameter adjustment control. When the user performs an adjustment operation, the value change listener callback function detects the value change and generates a value change interrupt signal. The current value is determined by extracting the changed value from the value change interrupt signal and using it as the current value output by the target audio parameter adjustment control.

[0061] In one embodiment, step S220, upon receiving an adjustment operation performed by a user on a target audio parameter adjustment control among at least one audio parameter adjustment controls, in response to the adjustment operation, determining the current value output by the target audio parameter adjustment control may include: upon receiving a value change interruption signal, determining the target audio parameter adjustment control based on the audio parameter adjustment control identification information carried by the value change interruption signal, and determining the current value output by the target audio parameter adjustment control based on the changed value carried by the value change interruption signal.

[0062] In this embodiment, the numerical change interrupt signal refers to the signal generated by the numerical change monitoring callback function of the target audio parameter adjustment control based on the user's adjustment operation.

[0063] For example, when a user drags a slider control to adjust the frequency parameter of the first band of the EQ equalizer, the slider control's value change monitoring callback function detects the change from 1000Hz to 1200Hz and generates a value change interrupt signal. This signal carries the slider control's identification information, such as the control ID "slider_eq_band0_freq", and the changed value of 1200Hz. Upon receiving this value change interrupt signal, the target audio parameter adjustment control is determined to be the slider control based on the control ID "slider_eq_band0_freq", and the current value is determined to be 1200Hz based on the value of 1200Hz carried in the value change interrupt signal.

[0064] In other examples, the value change listener callback function can also carry both the original value and the changed value when generating a value change interrupt signal. For instance, when a user adjusts the frequency parameter from 1000Hz to 1200Hz, the value change interrupt signal simultaneously carries the original value of 1000Hz and the changed value of 1200Hz. In this case, the magnitude of the parameter change is determined based on the difference between the original and changed values, thus deciding whether additional processing logic needs to be triggered.

[0065] By setting a value change listening callback function for the audio parameter adjustment control, when the user performs an adjustment operation, the value change listening callback function generates a value change interrupt signal, carrying the audio parameter adjustment control's identification information and the changed value. After receiving the value change listening callback function, the target audio parameter adjustment control and the current value can be quickly determined, enabling real-time response to the user's adjustment operation.

[0066] In some examples, once the current value output by the target audio parameter adjustment control is determined, that current value is written to the display buffer of the target audio parameter adjustment control. In other words, the audio parameter adjustment control displays the latest value in real time as the user adjusts it, regardless of whether that latest value has been written to the audio parameter memory.

[0067] Step S230: Determine the target parameter node pointed to by the target parameter positioning path in the audio parameter memory based on the target parameter positioning path associated with the target audio parameter adjustment control.

[0068] In this embodiment, the target parameter node refers to the parameter storage node in the audio parameter memory that corresponds to the target parameter location path.

[0069] The target parameter node is determined by locating it layer by layer in the tree structure of the audio parameters in memory based on the target parameter location path, and finally finding the parameter node corresponding to the target parameter location path. The current value is then written to the memory address of the target parameter node, thus completing the parameter update.

[0070] In some embodiments, step S230, which determines the target parameter node in the audio parameter memory based on the target parameter positioning path associated with the target audio parameter adjustment control, includes steps S2311 to S2315.

[0071] Step S2311: Using the set character as the delimiter, the parameter positioning path is divided into a sequence of path segments, and the current positioning pointer is set to the root node of the audio parameter memory.

[0072] In this embodiment, the setting character refers to the separator used to divide the path hierarchy. The setting character can be, for example, a forward slash " / ".

[0073] The parameter location path is a string used to uniquely locate the position of a parameter node in the audio parameter memory.

[0074] For example, the parameter location path can be "audio / eq / bands / 0 / frequency". The parameter location path is segmented using the specified character " / ", resulting in a sequence of path segments: ["audio", "eq", "bands", "0", "frequency"]. Each segment is called a path segment.

[0075] The current position pointer is a mutable reference used to indicate the current traversal position, initially pointing to the root node of the audio parameter memory.

[0076] The root node is the top-level starting node of the audio parameter memory tree structure, and all parameter data are expanded downwards from this root node.

[0077] In this step, the positioning pointer initially points to the root node, preparing to begin traversing downwards level by level.

[0078] Step S2312: Traverse each path segment in the path segment sequence in order.

[0079] This step is a loop traversal operation, that is, each path segment is extracted and processed one by one according to the order of the path segment sequence.

[0080] Continuing with the example above, the path segment sequence

"audio", "eq", "bands", "0", "frequency"

[0081] Step S2313: If the path segment being traversed does not contain an array index identifier, move the current positioning pointer from the current node to the child node under the current node that matches the path segment name.

[0082] In this embodiment, the audio parameter memory is organized in a tree structure, where nodes are divided into two categories: one is ordinary object nodes, which contain several named child nodes, and the access target can be uniquely identified by the child node name. The other is array nodes, which contain multiple sequentially numbered elements, and each element is located in the array by an index value (i.e., position number). For example, the "bands" array contains multiple frequency band elements, represented by indices 0, 1, 2, ...

[0083] The core task of path resolution is to start from the root node and locate the path segment sequence layer by layer downwards. The method of locating at each layer depends on the type of the currently arrived node and the information carried by the current path segment.

[0084] The array index identifier is a crucial piece of information carried by the path segment, originating from the data structure in the audio parameter memory. When a node in the tree structure is an array (e.g., "bands" contains multiple frequency bands), the array, as an ordered set, uniquely identifies and locates its elements only through their index values ​​(i.e., position numbers, such as 0, 1, 2). Therefore, during path resolution, if a path segment needs to access a specific element within the array, it must carry the array index identifier to indicate "currently needing to enter the array and locate the specific element by index." Conversely, if the path segment only points to the array as a whole, it does not need to carry this identifier.

[0085] The array index identifier can be represented as a pure number (such as "0"), or with square brackets (such as "[0]") or other conventional symbols, which are not limited here.

[0086] Therefore, step S2313 handles the case where "the path segment does not contain an array index identifier". This corresponds to two scenarios: First, the current path segment points to a child node under a regular object node (e.g., "audio", "eq", "frequency"). In this case, it is only necessary to match the name under the current node and move the positioning pointer. Second, the current path segment points to the entire array node (e.g., "bands"). In this case, it is only necessary to move the positioning pointer to the array node itself, without entering its internal elements. Therefore, step S2313 performs name matching and positioning pointer movement operations, without involving array element positioning.

[0087] Continuing with the example above, consider the path segment sequence

"audio", "eq", "bands", "0", "frequency"

[0088] Step S2314: If the currently traversed path segment contains an array index identifier, extract the index value from the path segment, move the current positioning pointer from the current node to the array under the current node that matches the path segment name, and move it to the element position in the array corresponding to the index value.

[0089] In this embodiment, when the path segment contains an array index identifier, it means that it is necessary to enter the array to locate a specific element, rather than staying in the array as a whole.

[0090] The index value is the value in the array index identifier, an integer value used to locate the position of a specific element in the array.

[0091] For example, the path segment "0" contains the index value 0, which indicates that the location is the 0th element of the array.

[0092] Continuing the example above, the current positioning pointer is located at the "eq" node. When traversing the path segment "bands", it is moved to the array node named "bands" under the "eq" node (staying on the entire array). Then, the path segment "0" is traversed. This path segment contains an array index identifier (represented in pure numeric form). At this point, the index value 0 is extracted, and the positioning pointer is moved from the "bands" array node to the element with index 0 in the array. This completes the positioning transition from "accessing the entire array" to "accessing a specific element in the array".

[0093] Step S2315: Repeat the above steps until all path segments in the path segment sequence have been traversed, and determine the node pointed to by the current positioning pointer as the target parameter node pointed to by the parameter positioning path in the audio parameter memory.

[0094] In this embodiment, the target parameter node is the node that the parameter positioning path ultimately points to, and this node stores the specific parameter values.

[0095] Continuing with the parameter location path "audio / eq / bands / 0 / frequency" as an example, after traversing the path segment sequence, the location pointer points to the "frequency" child node under the 0th element of the "bands" array. That is, the "frequency" child node is the target parameter node, and the value stored in the target parameter node is the parameter value that needs to be read or written.

[0096] As can be seen from steps S2311 to S2315 above, this embodiment achieves unified path access to the nested structure of audio parameters in memory by dividing the parameter positioning path into a sequence of path segments and traversing them sequentially, moving the current positioning pointer layer by layer. Furthermore, by determining whether a path segment contains an array index identifier, precise positioning of array elements can be supported, simplifying the access method for nested parameters.

[0097] Step S240: Based on the target parameter update synchronization mode associated with the target audio parameter adjustment control, write the current value to the target parameter node according to the writing strategy corresponding to the target parameter synchronization mode associated with the target audio parameter adjustment control.

[0098] The write strategy refers to the data writing method adopted by the synchronization mode based on different parameters.

[0099] In some embodiments, the target parameter update synchronization mode is an instant synchronization mode. Step S240, according to the target parameter update synchronization mode associated with the target audio parameter adjustment control, writing the current value to the target parameter node according to the writing strategy corresponding to the target parameter synchronization mode associated with the target audio parameter adjustment control may include: writing the current value to the memory address corresponding to the target parameter node in the audio parameter memory.

[0100] For example, the parameter update synchronization mode corresponding to the frequency slider of the first band of the EQ equalizer is real-time synchronization mode. When the user adjusts the frequency parameter of the first band of the EQ equalizer, the target audio parameter adjustment control is a slider control, the current value is 1200Hz, the target parameter node is the parameter node corresponding to "audio / eq / bands / 0 / frequency", and the target parameter update synchronization mode is real-time synchronization mode, at this time, 1200Hz is immediately written to the memory address corresponding to the target parameter node in the audio parameter memory, completing the parameter update.

[0101] The memory address refers to the physical storage location of the target parameter node in the audio parameter memory. The parameter value can be directly accessed and modified through this address.

[0102] For example, suppose the target parameter node is the node pointed to by the path "audio / eq / bands / 0 / frequency", which corresponds to a unique memory address in the audio parameter memory (such as 0x2000A100). The frequency value stored in this node can be read and written directly through this address.

[0103] The real-time synchronization mode is suitable for scenarios that require real-time feedback. Every time a parameter changes, the current value is immediately written to the corresponding memory address in the audio parameter memory. This ensures that the adjustment operations of the user interface controls can be reflected in the audio parameter memory in real time, achieving an instant parameter update effect.

[0104] In some embodiments, the target parameter update synchronization mode is a shake-resistant synchronization mode.

[0105] Based on these embodiments, step S240, which updates the target parameter synchronization mode associated with the target audio parameter adjustment control and writes the current value to the target parameter node according to the writing strategy corresponding to the target parameter synchronization mode associated with the target audio parameter adjustment control, may include steps S2411 to S2414.

[0106] Step S2411: Store the current value and the target parameter location path as an entry into the anti-shake storage hash table, and start the stable duration timer with the current time as the starting time; wherein, the anti-shake storage hash table is used to store the value to be written to the audio parameter memory, and the anti-shake storage hash table includes at least one entry, each entry containing a parameter location path and the value to be written corresponding to the parameter location path.

[0107] In this embodiment, the anti-shake storage hash table is a temporary storage structure located in memory and independent of the audio parameter memory. It is organized in key-value pair format, where the key is the parameter location path (in string form) and the value is the numerical value to be written corresponding to that parameter location path. The advantage of the hash table is that the corresponding value can be quickly found and updated using the path key without traversing the entire table.

[0108] When a user adjusts an audio parameter for the first time, the updated value of the audio parameter is not immediately written to the audio parameter memory. Instead, the updated value is first stored in the anti-shake storage hash table as a "pending change". The stabilization duration timer is started with the current time as the starting time to observe whether the user will continue to adjust the audio parameter in a short period of time.

[0109] The stabilization duration timer measures the elapsed time since the last update of an audio parameter. The set duration is a pre-configured time threshold (e.g., 50 milliseconds). The purpose of the stabilization duration timer is to continuously monitor for new parameter updates for that audio parameter during the stabilization duration period. If no parameter update is received for that audio parameter after the set duration has elapsed, the parameter adjustment is considered to have reached a stable state, and the latest value of the audio parameter can be written to the audio parameter memory.

[0110] It should be noted that if a user simultaneously operates multiple audio parameter adjustment controls in anti-shake synchronization mode, a stabilization duration timer will be started for each of these audio parameters to monitor the parameter updates of each audio parameter within a short period of time. The parameter updates of these multiple audio parameters within a short period of time will be stored in the anti-shake storage hash table.

[0111] The anti-shake storage hash table includes at least one entry, with each entry corresponding to a parameter location path for an audio parameter and a value to be written for that parameter location path.

[0112] For example, the parameter update synchronization mode corresponding to the frequency slider of the first band of the EQ equalizer is set to anti-jitter synchronization mode. The user starts dragging the frequency slider of the first band of the EQ equalizer, and the current value becomes 1200Hz. The parameter location path "audio / eq / bands / 0 / frequency" and the current value 1200Hz are stored as an entry in the anti-jitter storage hash table, and the stabilization duration timer starts from the current time (denoted as millisecond 0) and is set to 50 milliseconds. At this time, the hash table contains one entry with the key "audio / eq / bands / 0 / frequency" and the value 1200Hz, and the timer starts incrementing from 0 milliseconds.

[0113] In step S2412, if an updated value corresponding to the target parameter positioning path is received during the period when the stable duration timer has not reached the set duration, the value corresponding to the target parameter positioning path in the anti-shake storage hash table is updated according to the updated value, and the stable duration timer is restarted with the current time as the starting time.

[0114] In this embodiment, this step demonstrates the stabilization mechanism's processing logic for high-frequency continuous operations. If a user is adjusting an audio parameter adjustment control with a parameter update synchronization mode set to stabilization synchronization mode, a new value for that audio parameter will be received before the stabilization duration timer reaches the set duration (e.g., 50 milliseconds). At this time, only the value corresponding to that audio parameter in the stabilization storage hash table is updated (i.e., the old value is replaced with the new value), and if a new value for that audio parameter is subsequently received, the stabilization duration timer is reset. The key to this design is that intermediate values ​​during continuous adjustment are continuously overwritten by subsequent values ​​as "temporary values," and only the final stabilized value is retained.

[0115] The stabilization duration timer is reset each time a new value for the audio parameter is received, which is equivalent to extending the waiting window. This ensures that the value to be written in the anti-shake storage hash table will only be written to the audio parameter memory after the user has truly stopped operating and the full set duration has been stabilized.

[0116] Continuing the example above, if at the 20th millisecond, the current stable duration timer shows 20 milliseconds, not yet reaching the set duration of 50 milliseconds, and the user drags the frequency slider of the first band of the EQ equalizer to 1300Hz, the value corresponding to the path "audio / eq / bands / 0 / frequency" in the anti-shake storage hash table is updated from 1200Hz to 1300Hz, and the stable duration timer restarts with the 20th millisecond as the starting point. After the timer resets to zero, it begins incrementing again. At the 40th millisecond, the timer shows that 40 milliseconds have passed, but not yet reaching 50 milliseconds, and the user drags the frequency slider of the first band of the EQ equalizer to 1400Hz, the hash table value is updated again to 1400Hz, and the timer restarts with the 40th millisecond as the starting point. During this process, 1200Hz and 1300Hz, as intermediate values, only exist briefly in the hash table and are not written to the audio parameter memory.

[0117] Step S2413: When the stable duration reaches the set duration, other write operations are prohibited from accessing the audio parameter memory. All entries in the anti-shake storage hash table are traversed, and the corresponding target parameter node is determined according to the target parameter location path in each entry. The values ​​in each entry are written in batches to the memory address of the corresponding target parameter node in the audio parameter memory.

[0118] This step is the final execution stage of the anti-shake mechanism. When the stabilization timer reaches the set duration (e.g., 50 milliseconds) without any new parameter updates, it is determined that the user has stopped continuously adjusting the audio parameter, and the parameter value has entered a stable state. At this point, the actual data writing operation is triggered.

[0119] Before performing a write operation, other write operations are prohibited from accessing the audio parameter memory. This mechanism prevents other concurrent write requests (such as write operations from other controls or modules) from accessing the audio parameter memory simultaneously during the batch writing of values ​​to be written to the hash table, thus avoiding data races, write conflicts, or data inconsistencies. It is equivalent to applying a mutex lock to protect the memory operation.

[0120] To prevent other write operations from accessing the audio parameter memory, you can either set a global flag or use a mutex mechanism, where any other write request is blocked or returned for a retry during the write operation.

[0121] Subsequently, all entries in the debouncing storage hash table are traversed. For each entry, the corresponding target parameter node is obtained by parsing the path based on its parameters, the memory address of the node is determined, and the value to be written is written to that address.

[0122] Batch writing refers to writing all the values ​​to be written in the hash table to the audio parameter memory at once. Compared with performing the write operation one entry at a time, batch writing can significantly reduce the number of IO operations.

[0123] Continuing the example above, after the user stops operating at millisecond 40, no new update values ​​for that audio parameter are received between millisecond 40 and millisecond 90. At millisecond 90, the timer shows that 50 milliseconds have passed since millisecond 40, reaching the set duration, indicating that the audio parameter has stabilized. At this point, firstly, other write operations are prevented from accessing the audio parameter memory (e.g., by setting a lock flag). Then, the anti-jitter storage hash table is traversed, finding only one entry: the parameter location path "audio / eq / bands / 0 / frequency" corresponds to the value 1400Hz. Based on this path, the memory address of the corresponding target parameter node in the audio parameter memory is determined, and 1400Hz is written to that address. If multiple entries exist in the hash table (e.g., the user simultaneously adjusts multiple audio parameters with anti-jitter synchronization mode), all entries are written to their respective memory addresses at once.

[0124] Step S2414: After the write operation is completed, allow other write operations to access the audio parameter memory and clear the anti-shake storage hash table.

[0125] This step is the final stage of the debouncing mechanism. After the batch write is complete, the write restriction on the audio parameter memory is lifted, allowing other write operations to access the audio parameter memory normally again, ensuring that other modules or subsequent write requests can proceed normally. At the same time, the debouncing storage hash table is cleared, and all entries in it are deleted.

[0126] The purpose of the clear operation is to ensure that committed temporary data is not left behind, thus avoiding confusion or duplicate writing with new parameter updates in the next debouncing cycle.

[0127] Continuing with the example above, after writing 1400Hz to the audio parameter memory, write access to the audio parameter memory is restored, and the stabilization storage hash table is cleared, making the hash table empty and providing a clean initial state for subsequent stabilization synchronization operations.

[0128] Using the example of the anti-shake synchronization mechanism described above, the three parameter changes (1200Hz, 1300Hz, and 1400Hz) between 0 milliseconds and 40 milliseconds are merged into a single batch write operation. Ultimately, only the last stable value of 1400Hz is written to the audio parameter memory. The number of I / O operations is reduced from three to one, significantly reducing the system overhead in high-frequency adjustment scenarios.

[0129] In other implementations, the duration of the anti-shake synchronization mode can be dynamically adjusted based on different parameter types to adapt to diverse business needs. For example, for parameters in audio algorithms with high real-time requirements (such as volume control parameters), where users expect to feel the effect immediately after adjustment, the duration can be set to a shorter 20 milliseconds to trigger the write operation faster. Conversely, for parameters with lower real-time requirements (such as reverberation time parameters), where users are less sensitive to response speed, the duration can be set to a longer 100 milliseconds to further reduce I / O operations and optimize system performance. Through this dynamic configuration, the system can achieve a better balance between real-time response and performance optimization.

[0130] As can be seen from steps S2411 to S2414 above, the anti-shake synchronization mode of this embodiment is suitable for high-frequency update scenarios, such as when a user drags a slider for continuous adjustment. By setting a stable duration timing mechanism, multiple parameter changes within the stable duration are merged into a single batch write operation. When a new update value is received before the stable duration has been reached, the corresponding value in the anti-shake storage hash table is updated and the timing is restarted. Batch writing is only performed after the stable duration has been reached, thereby significantly reducing the number of input / output operations and avoiding the impact of frequent writing on system performance.

[0131] In some embodiments, the target parameter update synchronization mode is a manual synchronization mode. Step S240, which writes the current value to the target parameter node according to the writing strategy corresponding to the target parameter synchronization mode associated with the target audio parameter adjustment control, may include steps S2421 to S2423.

[0132] Step S2421: Store the current value and the target parameter location path into the manual submission cache area, and prevent the current value from being written to the audio parameter memory.

[0133] In this embodiment, the manual submission buffer is a region located in memory and independent of the audio parameter memory. This buffer is a temporary storage area for parameter changes that require manual confirmation, similar to the anti-jitter storage hash table structure, but with different write triggering conditions. In anti-jitter mode, writing is automatically triggered after a set timeout, while in manual mode, writing is only triggered after explicit user confirmation. For audio parameters with manual synchronization mode, even if the audio parameter value changes, the updated value is not written to the audio parameter memory. Instead, it is stored in the manual submission buffer awaiting user confirmation, thus ensuring that the updated value remains pending until user confirmation.

[0134] For example, if the parameter update synchronization mode corresponding to the frequency slider of the first band of the EQ equalizer is manual synchronization mode, the user adjusts the frequency parameter of the first band of the EQ equalizer to 1200Hz, stores the current value of 1200Hz and the target parameter location path "audio / eq / bands / 0 / frequency" in the manual submission buffer, and prevents the updated value of this audio parameter from being written to the audio parameter memory.

[0135] Step S2422: Upon receiving a confirmation submission command from the user, traverse all entries in the manual submission buffer, determine the corresponding target parameter node based on the parameter location path in each entry, and batch write the values ​​in each entry to the memory address of the corresponding target parameter node in the audio parameter memory.

[0136] In this embodiment, the confirmation submission instruction is a signal sent by the user through interface operation (such as clicking the confirmation button), indicating that the user has checked and confirmed that the parameter changes are correct and agrees to write the latest value of the audio parameter into the audio parameter memory.

[0137] After receiving confirmation from the user, the actual batch write operation is performed, writing all parameter changes to be submitted from the manual submission buffer to the audio parameter memory at once.

[0138] Continuing with the example above, the parameter update synchronization mode for the gain parameter adjustment control of the second band of the EQ equalizer is set to manual synchronization mode. The user further adjusts the gain parameter of this second band to 6dB, and saves this value and the corresponding parameter location path "audio / eq / bands / 1 / gain" to the manual submission buffer.

[0139] At this point, the manual commit buffer consists of two entries. The first entry: the current value 1200Hz and the target parameter location path "audio / eq / bands / 0 / frequency". The second entry: the current value 6dB and the parameter location path "audio / eq / bands / 1 / gain". Upon receiving a confirmation commit command, the current values ​​1200Hz and 6dB corresponding to these two entries are written in batches to the memory addresses of the corresponding parameter nodes in the audio parameter memory.

[0140] Step S2423: After writing is complete, clear the manual commit cache.

[0141] In this embodiment, the manual commit cache is cleared after the write operation is completed to ensure that the changes that have been committed will not be committed again, and to prepare for the next manual synchronization operation.

[0142] According to steps S2421 to S2423 above, in this embodiment of the present disclosure, through the above-mentioned manual synchronization mechanism, after the user performs an adjustment operation on the audio parameter adjustment control, the current value and the target parameter positioning path are stored in the manual submission buffer but not immediately written to the audio parameter memory. Only after the user explicitly inputs a confirmation submission command will a batch writing operation be performed, ensuring that the user has the opportunity to check and confirm the parameter changes before submitting, thus avoiding parameter errors caused by misoperation.

[0143] In other embodiments, the method further includes step S2424, clearing the manual submission cache area upon receiving a user input confirming that the user will not submit.

[0144] In this embodiment, the user can discard all pending changes in the current manual commit buffer. Upon receiving a confirmation instruction from the user not to commit, all entries in the manual commit buffer are cleared, and the original value of the audio parameter is read from the audio parameter memory and written to the display buffer of the corresponding audio parameter adjustment control, thus restoring the user interface to its state before adjustment.

[0145] For example, the manual submission buffer includes two entries. The first entry: current value 1200Hz and target parameter location path "audio / eq / bands / 0 / frequency". The second entry: current value 6dB and parameter location path "audio / eq / bands / 1 / gain". When the user clicks the undo button, these two entries in the manual submission buffer are cleared, and the original values ​​of these two audio parameters (e.g., frequency 1000Hz, gain 0dB) are read from the audio parameter memory and written to the display buffer of each audio parameter adjustment control, restoring the user interface to its state before adjustment.

[0146] By supporting undo operations, the risk of user errors can be further reduced, thus improving the user experience.

[0147] As can be seen from steps S210 to S240 above, this embodiment establishes a unified mapping relationship between user interface controls and the memory storage location of audio parameters by associating parameter positioning paths and parameter update synchronization modes with each audio parameter adjustment control. It adopts a unified path access format to support array index and nested attribute access, eliminating the need to write independent nested access code for different parameters, thus eliminating multi-level nested code, significantly reducing code size, simplifying parameter access, and lowering maintenance costs. Simultaneously, by employing corresponding write strategies based on different parameter update synchronization modes, it not only meets real-time feedback requirements but also optimizes the number of input / output operations in high-frequency parameter modification scenarios, improving the convenience and efficiency of audio parameter adjustment.

[0148] In some embodiments, after writing the current value to the target parameter node according to the writing strategy corresponding to the target parameter synchronization mode associated with the target audio parameter adjustment control in step S240, the method may further include: steps S250 to S270.

[0149] Step S250: After writing is complete, query the mapping relationship using the memory address of the target parameter node as the key to obtain the set of audio parameter adjustment controls associated with the target parameter node.

[0150] In this embodiment, the mapping relationship refers to the pre-established reverse index from the memory address of the parameter node to the audio parameter adjustment control, which is used to quickly find all controls that need to refresh the display interface after the parameters are updated.

[0151] An audio parameter adjustment control collection is a set of all audio parameter adjustment controls bound to the same parameter node. Audio parameter adjustment controls may include various control types such as sliders, knobs, and numeric input boxes.

[0152] After writing is complete, the memory address of the target parameter node that was just written is used as the key to query the pre-established mapping relationship and find all controls bound to that parameter node.

[0153] For example, after a user adjusts the frequency parameter to 1200Hz using the slider control A and writes it to the memory address 0x2000A100 of the target parameter node, the user can use this memory address as the key to query the mapping relationship and obtain the associated audio parameter adjustment control set, which includes the slider control A and the numeric input box control B.

[0154] Step S260: Read the updated value from the memory address of the target parameter node.

[0155] In this embodiment, the latest value of the memory address is read from the audio parameter memory and used as the base value for subsequent updates to the control display.

[0156] Continuing with the example above, the updated value of 1200Hz is read from memory address 0x2000A100.

[0157] Step S270: Iterate through each audio parameter adjustment control in the set of audio parameter adjustment controls and write the updated value into the display buffer of each audio parameter adjustment control.

[0158] In this embodiment, the display buffer refers to the memory area used by the audio parameter adjustment control to store the currently displayed value. Updating the buffer updates the visual presentation of the audio parameter adjustment control on the audio parameter adjustment interface.

[0159] Iterate through all associated audio parameter adjustment controls in the collection of audio parameter adjustment controls, write the latest value to the display buffer of these controls, thereby refreshing the user interface and ensuring that all controls displaying the parameter show the same latest value.

[0160] Continuing with the example above, we iterate through the set of audio parameter adjustment controls and write 1200Hz into the display buffers of the slider control A and the numeric input box control B, so that both controls display a frequency of 1200Hz on the interface, thus achieving bidirectional synchronization.

[0161] Based on steps S250 to S270 above, this embodiment of the present disclosure, through the aforementioned reverse notification mechanism, can automatically send the updated value back to all associated audio parameter adjustment controls after the parameter is written, thereby achieving bidirectional synchronization between the audio parameter memory and the user interface controls, and ensuring that the parameter value displayed on the user interface is always consistent with the value stored in the audio parameter memory.

[0162] <Second Embodiment> This embodiment provides an electronic device including a processor and a memory. The memory can be used to store a computer program, and the processor can be used to retrieve the computer program from the memory to execute any method embodiment of this disclosure. The processor can be one or more processors, which can execute instructions individually or jointly. Similarly, there can be one or more memories, which can store the aforementioned computer program individually or jointly. This electronic device can be an embedded audio device, an audio processor, a digital audio workstation, or a computing device with audio processing capabilities.

[0163] In some examples, the electronic device can be as follows: Figure 1 The device shown may also have only a memory, a processor, and a display device; this is not a limitation.

[0164] This disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the audio parameter adjustment method in any embodiment of this disclosure. Optionally, the computer-readable storage medium may be a non-transitory storage medium, but is not limited thereto; it may also be a temporary storage medium.

[0165] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0166] This disclosure may be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having a computer-readable program loaded thereon for causing a processor to implement any of the methods in the foregoing embodiments of this disclosure.

[0167] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media may include, for example, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), compact disc-read-only memory (CD-ROM), digital versatile disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any combination thereof. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0168] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include one or more of copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to computer-readable storage media in the respective computing / processing device.

[0169] The computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source or object programs written in any combination of one or more programming languages, including object-oriented programming languages ​​(such as Smalltalk, C++, etc.) and conventional procedural programming languages ​​(such as the "C" language or similar programming languages). The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network (e.g., a local area network or a wide area network), or it may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays, or programmable logic arrays, can execute computer-readable program instructions to implement various aspects of the embodiments of this disclosure by utilizing state information from the computer-readable program instructions.

[0170] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0171] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0172] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0173] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It should be noted that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are all equivalent.

[0174] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of this disclosure is defined by the appended claims.

Claims

1. A method for adjusting audio parameters, characterized in that, include: The audio parameter adjustment interface is displayed. The audio parameter adjustment interface includes at least one audio parameter adjustment control. Each audio parameter adjustment control is associated with a parameter positioning path and a parameter update synchronization mode. The parameter positioning path is used to indicate the storage location of the current value output by the audio parameter adjustment control in the audio parameter memory. The parameter update synchronization mode is used to indicate the synchronization mode used when the current value output by the audio parameter adjustment control is written to the audio parameter memory. Upon receiving an adjustment operation performed by a user on a target audio parameter adjustment control in at least one audio parameter adjustment control, the current value output by the target audio parameter adjustment control is determined in response to the adjustment operation; Based on the target parameter positioning path associated with the target audio parameter adjustment control, determine the target parameter node that the target parameter positioning path points to in the audio parameter memory; According to the target parameter update synchronization mode associated with the target audio parameter adjustment control, the current value is written to the target parameter node according to the writing strategy corresponding to the target parameter synchronization mode associated with the target audio parameter adjustment control.

2. The method according to claim 1, characterized in that, The target parameter update synchronization mode is an instant synchronization mode. The step of writing the current value to the target parameter node according to the writing strategy corresponding to the target parameter update synchronization mode, based on the target audio parameter adjustment control and its associated target parameter update synchronization mode, includes: Write the current value to the memory address corresponding to the target parameter node in the audio parameter memory.

3. The method according to claim 1, characterized in that, The target parameter update synchronization mode is an anti-shake synchronization mode. The step of writing the current value to the target parameter node according to the writing strategy corresponding to the target parameter update synchronization mode, based on the target audio parameter adjustment control associated with the target parameter update synchronization mode, includes: The current value and the target parameter location path are stored as an entry in the anti-shake storage hash table, and the stable duration timer is started with the current time as the starting time; wherein, the anti-shake storage hash table is used to store the value to be written to the audio parameter memory, and the anti-shake storage hash table includes at least one entry, each entry containing a parameter location path and the value to be written corresponding to the parameter location path; If an updated value corresponding to the target parameter positioning path is received during the period when the stable duration timer has not reached the set duration, the value corresponding to the target parameter positioning path in the anti-shake storage hash table is updated according to the updated value, and the stable duration timer is restarted with the current time as the starting time. When the stable duration reaches the set duration, other write operations are prohibited from accessing the audio parameter memory. All entries in the anti-shake storage hash table are traversed, and the corresponding target parameter node is determined according to the target parameter positioning path in each entry. The values ​​in each entry are written in batches to the memory address of the corresponding target parameter node in the audio parameter memory. After the write operation is complete, other write operations are allowed to access the audio parameter memory, and the anti-shake storage hash table is cleared.

4. The method according to claim 1, characterized in that, The target parameter update synchronization mode is a manual synchronization mode. The step of writing the current value to the target parameter node according to the writing strategy corresponding to the target parameter update synchronization mode, based on the target audio parameter adjustment control and its associated target parameter update synchronization mode, includes: Store the current value and the target parameter location path in the manual submission cache area, and prohibit writing the current value to the audio parameter memory; Upon receiving a confirmation submission command from the user, all entries in the manual submission buffer are traversed, the corresponding target parameter node is determined based on the parameter location path in each entry, and the values ​​in each entry are written in batches to the memory address of the corresponding target parameter node in the audio parameter memory. After writing is complete, clear the manual commit cache.

5. The method according to claim 1, characterized in that, The step of determining the target parameter node pointed to by the parameter positioning path in the audio parameter memory based on the parameter positioning path associated with the target audio parameter adjustment control includes: Using a set character as a delimiter, the parameter positioning path is divided into a sequence of path segments, and the current positioning pointer is set to point to the root node of the audio parameter memory; Traverse each path segment in the sequence of path segments in order; If the path segment being traversed does not contain an array index identifier, the current positioning pointer is moved from the current node to the child node under the current node that matches the path segment name; If the currently traversed path segment contains an array index identifier, extract the index value from the path segment, move the current positioning pointer from the current node to the array under the current node that matches the path segment name, and move it to the element position in the array corresponding to the index value. Repeat the above steps until all path segments in the path segment sequence have been traversed, and determine the node pointed to by the current positioning pointer as the target parameter node pointed to by the parameter positioning path in the audio parameter memory.

6. The method according to claim 1, characterized in that, After writing the current value to the target parameter node according to the write strategy corresponding to the target parameter update synchronization mode, the method further includes: Once the writing is complete, the mapping relationship is queried using the memory address of the target parameter node as the key to obtain the set of audio parameter adjustment controls associated with the target parameter node; Read the updated value from the memory address of the target parameter node; Iterate through each audio parameter adjustment control in the set of audio parameter adjustment controls, and write the updated value into the display buffer of each audio parameter adjustment control.

7. The method according to claim 1, characterized in that, The audio parameter adjustment control is at least one of a slider control, a rotary knob control, and a numeric input box control.

8. The method according to claim 1, characterized in that, The audio parameter adjustment interface includes: Obtain the root node data and mapping configuration file of the audio parameter memory; the audio parameter memory stores the current values ​​of the audio parameters in a tree structure, and the mapping configuration file contains at least one mapping relationship, each mapping relationship including the correspondence between the audio parameter adjustment control, the parameter positioning path, and the parameter update synchronization mode; For each mapping relationship in the mapping relationship configuration file, the memory address of the parameter node pointed to by the parameter positioning path in the audio parameter memory is determined according to the parameter positioning path in the mapping relationship. The currently stored value is read from the memory address, and the value is written into the display buffer of the corresponding audio parameter adjustment control according to the audio parameter adjustment control in the mapping relationship. After traversing all mapping relationships in the mapping relationship configuration file, each audio parameter adjustment control is rendered and presented at the corresponding position in the audio parameter adjustment interface according to the value in the display buffer of each audio parameter adjustment control.

9. The method according to claim 1, characterized in that, Upon receiving an adjustment operation performed by a user on a target audio parameter adjustment control among the at least one audio parameter adjustment controls, the step of determining the current value output by the target audio parameter adjustment control in response to the adjustment operation includes: Upon receiving a numerical change interruption signal, the target audio parameter adjustment control is determined based on the audio parameter adjustment control identification information carried by the numerical change interruption signal, and the current value output by the target audio parameter adjustment control is determined based on the changed value carried by the numerical change interruption signal; the numerical change interruption signal is generated by the numerical change monitoring callback function of the target audio parameter adjustment control based on the user's adjustment operation.

10. An electronic device, characterized in that, It includes a memory and a processor, the memory being used to store a computer program; the processor being used to execute the computer program to implement the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Recording control method and device, computer readable medium and electronic equipment

    CN113641330A

  • Method and device for adding parameters in published program

    CN113760379A