CN114385109A - Audio playing processing method and device, electronic equipment and storage medium - Google Patents

Audio playing processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114385109A
CN114385109A CN202210033716.6A CN202210033716A CN114385109A CN 114385109 A CN114385109 A CN 114385109A CN 202210033716 A CN202210033716 A CN 202210033716A CN 114385109 A CN114385109 A CN 114385109A
Authority
CN
China
Prior art keywords
audio
playing
played
target
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210033716.6A
Other languages
Chinese (zh)
Other versions
CN114385109B (en
Inventor
程益君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202210033716.6A priority Critical patent/CN114385109B/en
Publication of CN114385109A publication Critical patent/CN114385109A/en
Application granted granted Critical
Publication of CN114385109B publication Critical patent/CN114385109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C7/00Arrangements for writing information into, or reading information out from, a digital store
    • G11C7/16Storage of analogue signals in digital stores using an arrangement comprising analogue/digital [A/D] converters, digital memories and digital/analogue [D/A] converters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The method comprises the steps of receiving an audio playing instruction of audio to be played, determining the data source type of the audio to be played, acquiring the audio format and playing parameters of the audio to be played, generating a target playing task corresponding to the data source type, and calling a target player corresponding to the audio format to play the target playing task in response to the audio playing instruction when no playing task matched with the data source type exists in the tasks being played. Therefore, the problem of playing errors caused by the fact that a plurality of playing tasks under the same data source type are played simultaneously to influence playing effects is solved, and the fact that only one playing task in the same data source type can be played at the same time is guaranteed, so that the playing effects are improved.

Description

Audio playing processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of audio processing technologies, and in particular, to a method and an apparatus for processing audio playing, an electronic device, a computer-readable storage medium, and a computer program product.
Background
With the development of network technology, more and more users are used to online study and entertainment through the network. For example, learning and entertainment are performed by playing audio data through a network platform. The audio data has a plurality of different formats, and the audio data of each format is generally played by a corresponding player.
In the related art, the playing service in the network platform may create a player to play the corresponding audio data based on needs, for example, the playing service may create a corresponding player to play based on audio data of different formats that need to be played, and manage and control the created player. There are sometimes situations where one playback service needs to invoke a player created by another playback service to control the playing, interruption and resumption of audio.
However, the existing method of creating a player through a playing service and managing and controlling the player not only increases the service development cost, but also is prone to have a problem of playing errors when there are many playing services.
Disclosure of Invention
The present disclosure provides a processing method and apparatus for audio playing, an electronic device, a computer-readable storage medium, and a computer program product, so as to at least solve the problems that the method of creating a player through a playing service and managing the player in the related art is costly and a playing error is easy to occur. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a processing method for audio playing, including:
receiving an audio playing instruction of audio to be played, and determining a data source type of the audio to be played, wherein the data source type comprises any one of an audio stream type and a non-audio stream type;
acquiring an audio format and playing parameters of the audio to be played, and generating a target playing task corresponding to the data source type;
and when the playing task matched with the data source type does not exist in the playing tasks, responding to the audio playing instruction, and calling a target player corresponding to the audio format to play the target playing task.
In one embodiment, the method further comprises: when a playing task matched with the data source type exists in the playing tasks, determining a player corresponding to the playing task; and when the player is the same as a target player corresponding to the audio format, responding to the audio playing instruction, and instructing the player to switch the playing task being played to the target playing task.
In one embodiment, the method further comprises: when the player is different from the target player corresponding to the audio format, in response to the audio playing instruction, stopping the playing task being played by the player, and calling the target player corresponding to the audio format to play the target playing task.
In one embodiment, the method further comprises: and returning to continue playing the playing task when the playing of the target playing task is finished.
In one embodiment, before the invoking of the target player corresponding to the audio format to play the target play task, the method further includes: and determining a player corresponding to the audio format as the target player according to the corresponding relation between the pre-established audio format and the player.
In one embodiment, the obtaining the audio format of the audio to be played includes: identifying the file extension of the audio to be played, and acquiring keyword information in the file extension; and determining an audio format corresponding to the keyword information as the audio format of the audio to be played according to the pre-established corresponding relationship between the audio format and the keyword information.
According to a second aspect of the embodiments of the present disclosure, there is provided an audio playing processing apparatus, including:
the audio playing instruction receiving module is configured to execute receiving of an audio playing instruction of an audio to be played, and determine a data source type of the audio to be played, wherein the data source type includes any one of an audio stream type and a non-audio stream type;
the target playing task generating module is configured to execute the audio format and the playing parameters of the audio to be played and generate a target playing task corresponding to the type of the data source;
and the playing processing module is configured to respond to the audio playing instruction and call a target player corresponding to the audio format to play the target playing task when the playing task matched with the data source type does not exist in the playing tasks.
In one embodiment, the playback processing module is further configured to perform: when a playing task matched with the data source type exists in the playing tasks, determining a player corresponding to the playing task; and when the player is the same as a target player corresponding to the audio format, responding to the audio playing instruction, and instructing the player to switch the playing task being played to the target playing task.
In one embodiment, the playback processing module is further configured to perform: when the player is different from the target player corresponding to the audio format, in response to the audio playing instruction, stopping the playing task being played by the player, and calling the target player corresponding to the audio format to play the target playing task.
In one embodiment, the playback processing module is further configured to perform: and returning to continue playing the playing task when the playing of the target playing task is finished.
In one embodiment, the apparatus further includes a target player determination module configured to perform: and before a target player corresponding to the audio format is called to play the target playing task, determining the player corresponding to the audio format as the target player according to the pre-established corresponding relationship between the audio format and the player.
In one embodiment, the target playback task generation module is further configured to perform: identifying the file extension of the audio to be played, and acquiring keyword information in the file extension; and determining an audio format corresponding to the keyword information as the audio format of the audio to be played according to the pre-established corresponding relationship between the audio format and the keyword information.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the processing method of audio playback as described above in the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions of the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the processing method of audio playing as described in the first aspect above.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, which includes instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the processing method of audio playing as described in the first aspect above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: the method comprises the steps of determining the data source type of the audio to be played by receiving an audio playing instruction of the audio to be played, acquiring the audio format and the playing parameter of the audio to be played, generating a target playing task corresponding to the data source type, and calling a target player corresponding to the audio format to play the target playing task in response to the audio playing instruction when the playing task matched with the data source type does not exist in the tasks being played. Therefore, the problem of playing errors caused by the fact that a plurality of playing tasks under the same data source type are played simultaneously to influence playing effects is solved, and the fact that only one playing task in the same data source type can be played at the same time is guaranteed, so that the playing effects are improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flow chart illustrating a method of processing audio playback according to an exemplary embodiment.
Fig. 2 is a flowchart illustrating a method of processing audio playback according to another exemplary embodiment.
Fig. 3 is a diagram illustrating steps for obtaining an audio format of audio to be played according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating a processing method of audio playback according to yet another exemplary embodiment.
Fig. 5 is a block diagram illustrating an audio playback processing device according to an example embodiment.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are both information and data that are authorized by the user or sufficiently authorized by various parties.
The audio playing processing method provided by the disclosure can be applied to a terminal. As shown in fig. 1, the following steps are included.
In step S110, an audio playing instruction of the audio to be played is received, and a data source type of the audio to be played is determined.
The audio to be played refers to audio material to be played, such as a song, a piece of music, a recording file, a piece of voice message, and the like. The audio playing instruction is an instruction or a command for instructing the terminal to play the audio to be played. The data source type includes any one of an audio stream type and a non-audio stream type, specifically, the audio stream type refers to audio transmitted through a streaming technology on a network, such as an audio stream; non-audio stream types refer to audio that is not transmitted by streaming techniques, such as local audio files. Therefore, the corresponding data source type can be obtained based on the transmission mode of the audio to be played.
In this embodiment, the terminal determines the data source type of the audio to be played, that is, determines whether the audio to be played is an audio stream, by receiving an audio playing instruction of the audio to be played and according to a transmission mode of the audio to be played.
Specifically, the terminal may be a computer, a smartphone, a tablet computer, or the like. The terminal can be provided with a client, and various audio data can be processed and played through the client.
In step S120, an audio format and a playing parameter of the audio to be played are obtained, and a target playing task corresponding to the data source type is generated.
The audio format refers to a mode of playing or processing an audio file in the terminal and performing digital-to-analog conversion on the audio file. For example, common Audio formats include CD (Compact Disk) Format, WAVE Format (which is a sound File Format developed by microsoft and conforms to the File specification of PIFF (Resource exchange File Format)), AIFF Format (Audio exchange File Format), MPEG Format (Moving Picture Experts Group), WMA Format (Windows Media Audio Format), Audio Format (a compressed Digital Audio Format introduced by Sun Microsystems), MIDI (Musical Instrument Digital Interface) Format, and the like. Different audio formats have different file extensions of corresponding audio files, and different processing or conversion modes of the audio files are different during playing.
The playing parameters include data source of the audio to be played, setting parameters, such as file address and volume of the audio to be played. The target playing task is a task for playing the audio to be played, and is an object of the terminal for playing processing.
In this embodiment, after determining the data source type of the audio to be played through the above steps, the terminal further identifies the audio format of the audio to be played, and obtains a corresponding playing parameter, thereby generating a target playing task corresponding to the data source type. For example, when it is determined that the data source type of the audio to be played is an audio stream, a target playing task of the audio stream type is generated based on the audio format and the playing parameters of the audio to be played. And when the data source type of the audio to be played is determined not to be the audio stream, generating a target playing task of a non-audio stream type based on the audio format and the playing parameters of the audio to be played.
In step S130, when there is no playing task matching the data source type in the playing tasks, a target player corresponding to the audio format is called to play the target playing task in response to the audio playing instruction.
The target player is a player for playing a target playing task. While the player is a specific application for audio playback. And because different audio formats have different modes of processing or converting the audio file during playing, the different audio formats have corresponding players. For example, for an Audio file in Audio format, the corresponding player is play Audio Buffer (i.e. Audio stream player), and for an Audio file in MPEG format, the corresponding player may adopt MP4 player. There are also powerful players that have the ability to play audio files in a variety of audio formats.
Specifically, after the corresponding target playback tasks are generated according to the above steps, in order to avoid that the playback effect is affected by the simultaneous playback of multiple playback tasks, this embodiment also needs to determine whether a playback task matching the data source type exists in the currently played tasks of the terminal. And responding to the audio playing instruction and calling a target player corresponding to the audio format to play the target playing task only when the playing task matched with the data source type does not exist in the currently played tasks. For example, if the data source type of the target play task is an audio stream, it is further determined whether the play task currently being played is an audio stream type play task, and only when the play task currently being played is not an audio stream type, that is, no audio stream type play task is currently being played, the target player corresponding to the audio format of the audio to be played is called to play the corresponding target play task, so as to ensure that only one play task of the same data source type can be played at the same time.
In the audio playing processing method, the data source type of the audio to be played is determined by receiving the audio playing instruction of the audio to be played, the audio format and the playing parameter of the audio to be played are obtained, a target playing task corresponding to the data source type is generated, and when the playing task matched with the data source type does not exist in the task being played, a target player corresponding to the audio format is called to play the target playing task in response to the audio playing instruction. Therefore, the problem of playing errors caused by the fact that a plurality of playing tasks under the same data source type are played simultaneously to influence playing effects is solved, and the fact that only one playing task in the same data source type can be played at the same time is guaranteed, so that the playing effects are improved.
In an exemplary embodiment, as shown in fig. 2, the processing method of audio playing may further include the following steps:
in step S210, when there is a play task matching the data source type among the tasks being played, a player corresponding to the play task is determined.
The playing task refers to a task currently being played, and the player refers to a player used by the task currently being played. Specifically, when it is determined that a play task matching the data source type of the audio to be played exists in the currently playing tasks, that is, the data source type of the currently playing task is the same as the data source type of the audio to be played, a player used by the currently playing task is further determined, whether the currently used player is the same as a target player corresponding to the audio format of the audio to be played is determined, and then playing processing is performed based on subsequent steps.
In step S220, when the player is the same as the target player corresponding to the audio format, the player is instructed to switch the playing task being played to the target playing task in response to the audio playing instruction.
Specifically, if it is determined that the player used by the task currently being played is the same as the target player corresponding to the audio format of the audio to be played, the player is instructed to switch the playing task currently being played to the target playing task in response to the audio playing instruction. Because the player used by the task currently being played is the same as the target player needed by the target playing task corresponding to the audio to be played, the player can be directly controlled to pause the task currently being played and play the target playing task based on the audio playing instruction.
In the above embodiment, when there is a play task matching the data source type in the tasks being played, the player corresponding to the play task is determined, and when the player is the same as the target player corresponding to the audio format, the player is instructed to switch the play task being played to the target play task in response to the audio play instruction. In this embodiment, when it is determined that the player used by the currently playing task is the same as the target player required by the target playing task, the player is directly controlled to pause the currently playing task based on the audio playing instruction, and the target playing task is played, so that the player and the playing task are controlled in a centralized manner, and the problem of playing errors is avoided.
In an exemplary embodiment, the method may further include: when the player is different from the target player corresponding to the audio format, the playing task which is played by the player is stopped in response to the audio playing instruction, and the target player corresponding to the audio format is called to play the target playing task.
Specifically, when it is determined that a player used by a task currently being played is different from a target player required to be used by a target play task, switching between the player and the play task is performed in response to an audio play instruction. For example, a player used by a task currently being played is paused, and a target player corresponding to the audio format of the audio to be played is called to play a target playing task, so that the player currently being used is switched to the target player, and the task currently being played is switched to the target playing task. The player and the playing task are managed and controlled in a centralized mode, and the problem of playing errors is avoided.
In an exemplary embodiment, the method may further include: and returning to continue playing the playing task when the playing of the target playing task is finished. The playing task refers to a task which is paused when the target playing task is played, and the data source type of the playing task is matched with the data source type of the target playing task. Specifically, when the target playing task corresponding to the audio to be played is played completely, the playing task which is paused before the audio to be played is resumed. In this embodiment, when the playing of the target playing task is completed, the playback is returned to continue playing the playing task, so that centralized management and control over the playing task are realized, a playing error is avoided, and a playing effect can be improved.
In an exemplary embodiment, before invoking the target player corresponding to the audio format to play the target play task in step S130, the method may further include: and determining the player corresponding to the audio format as a target player according to the corresponding relation between the audio format and the player established in advance.
Due to different audio formats, the audio files are processed or converted in different ways during playing, and for different audio formats, the audio files have corresponding players. Therefore, in this embodiment, by establishing a corresponding relationship between the audio format and the player in advance, the player corresponding to the audio format of the audio to be played can be determined based on the corresponding relationship, and the player is taken as the target player. In this embodiment, through the pre-established correspondence between the audio format and the player, the target player corresponding to the audio format of the audio to be played, that is, the target player corresponding to the target playing task, can be quickly determined, so as to further improve the playing effect. And when the audio format is newly added or the player needs to be expanded, the corresponding relation is configured or adjusted correspondingly based on the newly added audio format or the expanded player without redevelopment.
In an exemplary embodiment, as shown in fig. 3, in step S120, acquiring an audio format of an audio to be played may further include the following steps:
in step S122, a file extension of the audio to be played is identified, and keyword information in the file extension is acquired.
Among them, the file Extension (Filename Extension) is also called the suffix name of the file, and is a mechanism used by the operating system to mark the file type. Extensions are almost an indispensable part of each file, and if a file has no extension, the operating system cannot determine how to handle the file and cannot handle the file.
The keyword information is a mark for distinguishing file formats in a file extension, such as a Word file, the keyword information in the file extension is ". doc" or ". docx", such as an Excel file, and the keyword information in the file extension is ". xls" or ". xlsx". For the file extension of the audio to be played in this embodiment, the keyword information in the file extension is different based on different audio formats. For example, for an audio file in WAVE format, the keyword information in the corresponding file extension is ". WAV", and for an audio file in AIFF format, the keyword information in the corresponding file extension is ". AIF" or ". AIFF".
Specifically, in this embodiment, the keyword information in the file extension is obtained by identifying the file extension of the audio to be played, and the audio format of the audio to be played can be determined according to the subsequent steps.
In step S124, an audio format corresponding to the keyword information is determined as an audio format of the audio to be played according to a pre-established correspondence between the audio format and the keyword information.
Since the key information is a mark in the file extension for distinguishing file formats, the key information in the file extension is different for different audio formats. Therefore, in this embodiment, by establishing a corresponding relationship between the audio format and the keyword information in advance, the audio format of the audio to be played can be determined based on the identified keyword information in the file extension of the audio to be played and the corresponding relationship. For example, if a corresponding relationship between the audio format "WAVE format" and the keyword information ". WAV" is established in advance, and based on the identification in the above steps, if the keyword information in the file extension of the audio to be played is obtained as ". WAV", based on the above corresponding relationship, the audio format corresponding to the keyword information ". WAV" may be determined as "WAVE format", that is, the audio format of the audio to be played is obtained as "WAVE format".
In this embodiment, the file extension of the audio to be played is identified, the keyword information in the file extension is obtained, and according to the pre-established correspondence between the audio format and the keyword information, the audio format corresponding to the keyword information can be quickly determined, that is, the audio format of the audio to be played can be quickly determined, and then the corresponding player can be called to play according to the audio format, so that the playing effect is further improved.
In an exemplary embodiment, the following further describes the processing method of the audio playing, as shown in fig. 4, specifically including the following steps:
in step S410, an audio playing instruction of the audio to be played is received, and a data source type of the audio to be played is determined.
Specifically, when the user has an audio playing requirement, an audio playing instruction of the audio to be played may be initiated based on the terminal, and the terminal may receive the corresponding audio playing instruction and determine the type of the data source of the audio to be played.
In step S420, an audio format and a playing parameter of the audio to be played are obtained, and a target playing task corresponding to the data source type is generated.
In step S430, a player corresponding to the audio format is determined as a target player according to a pre-established correspondence between the audio format and the player.
In step S440, it is determined whether there is a playback task matching the data source type among the currently playing tasks. When not present, step S450 is performed, and when present, step S460 is performed.
In step S450, in response to the audio play instruction, the target player is invoked to play the target play task.
Specifically, when there is no playing task matching with the data source type in the currently playing tasks, a target player corresponding to the audio format is called to play the target playing task in response to the audio playing instruction.
In step S460, it is determined whether the player corresponding to the playing task currently being played is the same as the target player corresponding to the audio format. If the two are the same, step S470 is performed, and if the two are not the same, step S480 is performed.
In step S470, in response to the audio play instruction, the player is instructed to switch the play task being played to the target play task.
Specifically, when the player is the same as the target player corresponding to the audio format, the player is instructed to switch the playing task being played to the target playing task in response to the audio playing instruction.
In step S480, in response to the audio playing instruction, the playing task being played by the player is stopped, and the target player is called to play the target playing task.
Specifically, when the player is different from the target player corresponding to the audio format, the playing task being played by the player is stopped in response to the audio playing instruction, and the target player corresponding to the audio format is called to play the target playing task.
In step S490, when the playback of the target playback task is completed, the playback is returned to the resume paused playback task.
In this embodiment, by receiving an audio playing instruction of an audio to be played, determining a data source type of the audio to be played, obtaining an audio format and a playing parameter of the audio to be played, generating a target playing task corresponding to the data source type, and performing playing control based on the data source type to which the task and the target playing task are currently played and the adopted player, thereby implementing centralized control over the playing task and the player, avoiding the problem that playing effect is affected by simultaneous playing of multiple playing tasks in the same data source type, which results in playing errors, ensuring that only one playing task in the same data source type can be played at the same time, and improving playing quality.
It should be understood that although the various steps in the flowcharts of fig. 1-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps or stages.
It is understood that the same/similar parts between the embodiments of the method described above in this specification can be referred to each other, and each embodiment focuses on the differences from the other embodiments, and it is sufficient that the relevant points are referred to the descriptions of the other method embodiments.
Fig. 5 is a block diagram illustrating a processing device for audio playback according to an example embodiment. Referring to fig. 5, the apparatus includes an audio play instruction receiving module 502, a target play task generating module 504, and a play processing module 506.
An audio playing instruction receiving module 502 configured to execute receiving an audio playing instruction of an audio to be played, and determine a data source type of the audio to be played, where the data source type includes any one of an audio stream type and a non-audio stream type;
a target playing task generating module 504, configured to execute obtaining an audio format and a playing parameter of the audio to be played, and generate a target playing task corresponding to the data source type;
and the playing processing module 506 is configured to, when there is no playing task matching the data source type in the playing tasks, respond to the audio playing instruction, and invoke a target player corresponding to the audio format to play the target playing task.
In an exemplary embodiment, the play processing module is further configured to perform: when a playing task matched with the data source type exists in the playing tasks, determining a player corresponding to the playing task; and when the player is the same as a target player corresponding to the audio format, responding to the audio playing instruction, and instructing the player to switch the playing task being played to the target playing task.
In an exemplary embodiment, the play processing module is further configured to perform: when the player is different from the target player corresponding to the audio format, in response to the audio playing instruction, stopping the playing task being played by the player, and calling the target player corresponding to the audio format to play the target playing task.
In an exemplary embodiment, the play processing module is further configured to perform: and returning to continue playing the playing task when the playing of the target playing task is finished.
In an exemplary embodiment, the apparatus further comprises a target player determination module configured to perform: and before a target player corresponding to the audio format is called to play the target playing task, determining the player corresponding to the audio format as the target player according to the pre-established corresponding relationship between the audio format and the player.
In an exemplary embodiment, the target playback task generation module is further configured to perform: identifying the file extension of the audio to be played, and acquiring keyword information in the file extension; and determining an audio format corresponding to the keyword information as the audio format of the audio to be played according to the pre-established corresponding relationship between the audio format and the keyword information.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 6 is a block diagram illustrating an electronic device Z00 for processing of audio playback, according to an example embodiment. For example, electronic device Z00 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and so forth.
Referring to fig. 6, electronic device Z00 may include one or more of the following components: a processing component Z02, a memory Z04, a power component Z06, a multimedia component Z08, an audio component Z10, an interface for input/output (I/O) Z12, a sensor component Z14 and a communication component Z16.
The processing component Z02 generally controls the overall operation of the electronic device Z00, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component Z02 may include one or more processors Z20 to execute instructions to perform all or part of the steps of the method described above. Further, the processing component Z02 may include one or more modules that facilitate interaction between the processing component Z02 and other components. For example, the processing component Z02 may include a multimedia module to facilitate interaction between the multimedia component Z08 and the processing component Z02.
The memory Z04 is configured to store various types of data to support operations at the electronic device Z00. Examples of such data include instructions for any application or method operating on electronic device Z00, contact data, phonebook data, messages, pictures, videos, and the like. The memory Z04 may be implemented by any type or combination of volatile or non-volatile storage devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, optical disk, or graphene memory.
The power supply component Z06 provides power to the various components of the electronic device Z00. The power component Z06 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device Z00.
The multimedia component Z08 comprises a screen providing an output interface between the electronic device Z00 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component Z08 includes a front facing camera and/or a rear facing camera. When the electronic device Z00 is in an operating mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component Z10 is configured to output and/or input an audio signal. For example, the audio component Z10 includes a Microphone (MIC) configured to receive external audio signals when the electronic device Z00 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory Z04 or transmitted via the communication component Z16. In some embodiments, the audio component Z10 also includes a speaker for outputting audio signals.
The I/O interface Z12 provides an interface between the processing component Z02 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly Z14 includes one or more sensors for providing status assessment of various aspects to the electronic device Z00. For example, the sensor assembly Z14 may detect the open/closed state of the electronic device Z00, the relative positioning of the components, such as the display and keypad of the electronic device Z00, the sensor assembly Z14 may also detect a change in the position of the electronic device Z00 or electronic device Z00 components, the presence or absence of user contact with the electronic device Z00, the orientation or acceleration/deceleration of the device Z00, and a change in the temperature of the electronic device Z00. The sensor assembly Z14 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly Z14 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly Z14 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component Z16 is configured to facilitate wired or wireless communication between the electronic device Z00 and other devices. The electronic device Z00 may have access to a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component Z16 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component Z16 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device Z00 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods.
In an exemplary embodiment, a computer readable storage medium is also provided, for example the memory Z04, comprising instructions executable by the processor Z20 of the electronic device Z00 to perform the above method. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which comprises instructions executable by the processor Z20 of the electronic device Z00 to perform the above method.
It should be noted that the descriptions of the above-mentioned apparatus, the electronic device, the computer-readable storage medium, the computer program product, and the like according to the method embodiments may also include other embodiments, and specific implementations may refer to the descriptions of the related method embodiments, which are not described in detail herein.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for processing audio playback, the method comprising:
receiving an audio playing instruction of audio to be played, and determining a data source type of the audio to be played, wherein the data source type comprises any one of an audio stream type and a non-audio stream type;
acquiring an audio format and playing parameters of the audio to be played, and generating a target playing task corresponding to the data source type;
and when the playing task matched with the data source type does not exist in the playing tasks, responding to the audio playing instruction, and calling a target player corresponding to the audio format to play the target playing task.
2. The method of claim 1, further comprising:
when a playing task matched with the data source type exists in the playing tasks, determining a player corresponding to the playing task;
and when the player is the same as a target player corresponding to the audio format, responding to the audio playing instruction, and instructing the player to switch the playing task being played to the target playing task.
3. The method of claim 2, further comprising:
when the player is different from the target player corresponding to the audio format, in response to the audio playing instruction, stopping the playing task being played by the player, and calling the target player corresponding to the audio format to play the target playing task.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
and returning to continue playing the playing task when the playing of the target playing task is finished.
5. The method according to any one of claims 1 to 3, wherein before the invoking of the target player corresponding to the audio format to play the target play task, the method further comprises:
and determining a player corresponding to the audio format as the target player according to the corresponding relation between the pre-established audio format and the player.
6. The method according to any one of claims 1 to 3, wherein the obtaining the audio format of the audio to be played comprises:
identifying the file extension of the audio to be played, and acquiring keyword information in the file extension;
and determining an audio format corresponding to the keyword information as the audio format of the audio to be played according to the pre-established corresponding relationship between the audio format and the keyword information.
7. An apparatus for processing audio playback, comprising:
the audio playing instruction receiving module is configured to execute receiving of an audio playing instruction of an audio to be played, and determine a data source type of the audio to be played, wherein the data source type includes any one of an audio stream type and a non-audio stream type;
the target playing task generating module is configured to execute the audio format and the playing parameters of the audio to be played and generate a target playing task corresponding to the type of the data source;
and the playing processing module is configured to respond to the audio playing instruction and call a target player corresponding to the audio format to play the target playing task when the playing task matched with the data source type does not exist in the playing tasks.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the processing method of audio playback as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the processing method of audio playback of any of claims 1 to 6.
10. A computer program product comprising instructions which, when executed by a processor of an electronic device, enable the electronic device to carry out the method of processing audio playback of any one of claims 1 to 6.
CN202210033716.6A 2022-01-12 2022-01-12 Audio playing processing method and device, electronic equipment and storage medium Active CN114385109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210033716.6A CN114385109B (en) 2022-01-12 2022-01-12 Audio playing processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210033716.6A CN114385109B (en) 2022-01-12 2022-01-12 Audio playing processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114385109A true CN114385109A (en) 2022-04-22
CN114385109B CN114385109B (en) 2024-01-09

Family

ID=81201343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210033716.6A Active CN114385109B (en) 2022-01-12 2022-01-12 Audio playing processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114385109B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160309210A1 (en) * 2013-11-25 2016-10-20 Le Shi Zhi Xin Electronic Technology (Tianjin) Limited Video playback method, apparatus and intelligent terminal
CN108259985A (en) * 2018-01-09 2018-07-06 武汉斗鱼网络科技有限公司 Live audio sound mixing method, device, readable storage medium storing program for executing and equipment
CN111526404A (en) * 2020-04-27 2020-08-11 杭州海康威视系统技术有限公司 Single frame playing method, device, equipment and storage medium
CN111797270A (en) * 2019-08-07 2020-10-20 厦门雅基软件有限公司 Audio playing method and device, electronic equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160309210A1 (en) * 2013-11-25 2016-10-20 Le Shi Zhi Xin Electronic Technology (Tianjin) Limited Video playback method, apparatus and intelligent terminal
CN108259985A (en) * 2018-01-09 2018-07-06 武汉斗鱼网络科技有限公司 Live audio sound mixing method, device, readable storage medium storing program for executing and equipment
CN111797270A (en) * 2019-08-07 2020-10-20 厦门雅基软件有限公司 Audio playing method and device, electronic equipment and computer readable storage medium
CN111526404A (en) * 2020-04-27 2020-08-11 杭州海康威视系统技术有限公司 Single frame playing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114385109B (en) 2024-01-09

Similar Documents

Publication Publication Date Title
RU2656693C2 (en) Event prompting method and device
CN104958898A (en) Method, apparatus and system for controlling video games
CN108495168B (en) Bullet screen information display method and device
CN111935357B (en) Multimedia playing method and equipment
CN105427161A (en) Monetary exchange rate exchange method and device
CN105100074A (en) Data operation processing method, device and terminal equipment
US20240127856A1 (en) Audio processing method and apparatus, and electronic device and storage medium
CN104539871A (en) Multimedia call method and device
CN109358933A (en) The creation method and device applied fastly
CN107272896B (en) Method and device for switching between VR mode and non-VR mode
CN106598432A (en) Multimedia playing method and device
CN105391624A (en) Notification message transmission method, device and system
CN106792024B (en) Multimedia information sharing method and device
CN104486295A (en) Audio playing method and device
CN110767203A (en) Audio processing method and device, mobile terminal and storage medium
CN106528442B (en) Cache cleaning method and device
CN105472149A (en) Ringtone setting method and apparatus thereof
CN104899151A (en) Memory data read-write method and memory data read-write device
CN114385109B (en) Audio playing processing method and device, electronic equipment and storage medium
CN106789943B (en) Playing method and device of Bluetooth equipment
CN104765686A (en) Application program testing method and device
EP3823238A1 (en) Method and apparatus for controlling devices and storage medium
CN113655984A (en) Audio playback control method, audio playback control device, and computer storage medium
CN113692067A (en) Device connection method, device and readable storage medium
CN107340990B (en) Playing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant