CN111460211A - Audio information playing method and device and electronic equipment - Google Patents

Audio information playing method and device and electronic equipment Download PDF

Info

Publication number
CN111460211A
CN111460211A CN202010262870.1A CN202010262870A CN111460211A CN 111460211 A CN111460211 A CN 111460211A CN 202010262870 A CN202010262870 A CN 202010262870A CN 111460211 A CN111460211 A CN 111460211A
Authority
CN
China
Prior art keywords
playing
audio
instance
audio information
playback
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.)
Pending
Application number
CN202010262870.1A
Other languages
Chinese (zh)
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010262870.1A priority Critical patent/CN111460211A/en
Publication of CN111460211A publication Critical patent/CN111460211A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/63Querying
    • G06F16/638Presentation of query results
    • G06F16/639Presentation of query results using playlists
    • 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
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • 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
    • G06F3/167Audio in a user interface, e.g. using voice commands for navigating, audio feedback

Abstract

The embodiment of the disclosure discloses an audio information playing method and device and electronic equipment. One embodiment of the method comprises: receiving a playing instruction for playing the first audio information; determining whether there is a currently idle first audio playback instance; in response to determining that there is a currently idle first audio playback instance, playing the first audio information using the first target audio playback instance, taking the currently idle first audio playback instance as a first target audio playback instance. The multiplexing of the audio playing examples is realized, the steps of creating and destroying the audio playing examples are reduced, and the use efficiency of the audio playing examples is improved. The method reduces the abnormity caused by interruption of the audio playing instance, and can improve the stability of the audio playing instance.

Description

Audio information playing method and device and electronic equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to an audio information playing method and apparatus, and an electronic device.
Background
For the IOS operating system, audio information is played using an audio playing instance. When an audio playing instruction is received, an audio playing instance is created to play the audio information corresponding to the audio playing instruction. After the audio information is played, the audio playing instance is destroyed.
Disclosure of Invention
This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides an audio information playing method and device and electronic equipment.
In a first aspect, an embodiment of the present disclosure provides an audio information playing method, where the method includes: receiving a playing instruction for playing the first audio information; determining whether a currently idle first target audio playback instance exists; in response to determining that there is a currently idle audio playback instance, playing the first audio information using the currently idle first target audio playback instance.
In a second aspect, an embodiment of the present disclosure provides an audio information playing apparatus, including: the receiving unit is used for receiving a playing instruction for playing the first audio information; a determining unit, configured to determine whether there is a currently idle first target audio playback instance; and the playing unit is used for responding to the determined existence of the currently idle audio playing example and playing the first audio information by using the currently idle first target audio playing example.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device for storing one or more programs which, when executed by one or more processors, cause the one or more processors to implement the audio information playback method as in the first aspect.
In a fourth aspect, the disclosed embodiments provide a computer-readable medium, on which a computer program is stored, which when executed by a processor, implements the steps of the audio information playing method according to the first aspect.
According to the audio information playing method, the audio information playing device and the electronic equipment, the playing instruction for playing the first audio information is received; determining whether there is a currently idle first audio playback instance; in response to determining that there is a currently idle first audio playback instance, playing the first audio information using the first target audio playback instance with the currently idle first audio playback instance as the first target audio playback instance. The multiplexing of the audio playing examples is realized, the steps of creating and destroying the audio playing examples are reduced, and the use efficiency of the audio playing examples is improved. The method reduces the abnormity caused by interruption of the audio playing instance, and can improve the stability of the audio playing instance.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flow diagram of one embodiment of an audio information playback method according to the present disclosure;
FIG. 2 is a schematic flow chart diagram of an audio information playback method according to the present disclosure;
FIG. 3 is a flow chart of another embodiment of an audio information playback method according to the present disclosure;
FIG. 4 is another schematic flow chart diagram of an audio information playback method according to the present disclosure;
FIG. 5 is a schematic block diagram of one embodiment of an audio information playback device according to the present disclosure;
FIG. 6 is an exemplary system architecture to which the audio information playback method of one embodiment of the present disclosure may be applied;
fig. 7 is a schematic diagram of a basic structure of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Referring to fig. 1, a flow of an embodiment of an audio information playing method according to the present disclosure is shown. The audio information playing method shown in fig. 1 includes the following steps:
step 101, receiving a playing instruction for playing first audio information.
The first audio information here may be any audio information in a preset application. For example a piece of music, a piece of speech, and also audio information including video content. The first audio information may be content displayed in a preset application client.
The user can select the first audio information displayed on the preset application client through selection modes such as clicking, touch control and the like, so that a playing instruction for playing the first audio information is sent to the preset application client. Or the user may input an instruction for playing the first audio information through a voice instruction. For example, the user may issue a playing instruction for playing the first audio information to the preset application client by inputting a name of the first audio information or an identifier of the first audio information through voice.
It should be noted that a plurality of audio information may be displayed in the preset application client, and the first audio information may be determined from the plurality of audio information according to the selection operation of the user.
Step 102, it is determined whether there is a first audio playback instance that is currently idle.
In this embodiment, a plurality of first audio playback instances may be created in advance. The plurality of first audio playback instances herein may have a preset area.
In some application scenarios, when the user starts the preset application client, a plurality of first audio playing instances corresponding to the preset application client may be created. The plurality of first audio playback instances may be stored in a preset area.
In these application scenarios, a first audio playback instance queue corresponding to the preset application may be preset. A plurality of first audio playback instances may be stored in the first audio playback instance queue. In the queue, the current state corresponding to each first audio playing instance can be stored in an associated manner. The states corresponding to the first audio playback instance herein may include idle, occupied, paused, and the like.
In some application scenarios, different applications may correspond to different queues of audio playback instances. Each audio playback instance queue may include at least one audio playback instance therein.
In the iOS operating system, the first audio playback instance described above may be an instantiation of an audio unit (audio unit). When an audio unit is instantiated, parameters such as input/output format, audio format attribute, sound effect processing, and the like need to be set for the audio unit.
After receiving a play instruction of the user for playing the first audio information, it may be determined whether there is a currently idle first audio playing instance from a preset first audio playing instance queue.
Step 103, in response to determining that there is a currently idle first audio playing instance, taking the currently idle first audio playing instance as a first target audio playing instance, and playing the first audio information using the first target audio playing instance.
Specifically, the free first audio playing instance may be taken out from the queue, and then the free first audio playing instance may be used as the first target audio playing instance. The first audio information is played using the first target audio playback instance.
In some application scenarios, when the current states of more than two first audio playing instances in the queue of the first audio playing instance are idle, one first audio playing instance with the top sequence number in the queue may be selected as the first target audio playing instance.
The method provided by the above embodiment of the present disclosure includes receiving a play instruction for playing first audio information; determining whether there is a currently idle first audio playback instance; in response to determining that there is a currently idle first audio playback instance, playing the first audio information using the first target audio playback instance with the currently idle first audio playback instance as the first target audio playback instance. The multiplexing of the audio playing examples is realized, the steps of creating and destroying the audio playing examples are reduced, and the use efficiency of the audio playing examples is improved. The method reduces the abnormity caused by interruption of the audio playing instance, and can improve the stability of the audio playing instance.
In some optional implementation manners of this embodiment, the audio information playing method further includes: in response to determining that there is no currently idle first audio playback instance, an audio playback instance is created as a first target audio playback instance.
In these alternative implementations, when it is determined that there is no first audio playback instance that has been created that is currently idle, one audio playback instance may be created as the first target audio playback instance. Thereby ensuring that the first audio information can be played normally.
In some optional implementation manners of this embodiment, the audio information playing method further includes: in response to the first audio information being played over, determining whether the first target audio playback instance is placeable in the first audio playback instance queue; and in response to determining that the first target audio playing instance can be placed in the queue, placing the first target audio playing instance in the queue, and setting the state attribute of the first target audio playing instance to be free.
In these alternative implementations, after the playing of the first audio information is finished, the first audio playing instance may be stored at the end of the queue of the first audio playing instance. And sets the state attribute of the first audio playback instance to idle. That is, when an audio playing instruction issued by the user is received next time, the first audio playing instance may be taken as a candidate first audio playing instance.
After the first audio information is played, the first audio playing instance is placed in a queue of the first audio playing instance, so that the first audio playing instance can be used for a future audio playing task. The reuse rate of the first audio playback instance can be increased.
Referring to fig. 2, a schematic flow chart of an audio information playing method according to the present disclosure is shown.
As shown in fig. 2, after receiving an audio/video playing instruction, an application client installed on a terminal device may send a request for acquiring an audio playing instance to the terminal device. The terminal device extracts a currently idle first audio playing instance from an audio playing instance pool (namely, a first audio playing instance queue) as a first target audio playing instance, and provides the first target audio playing instance to the application client. And the application client uses the first target audio playing instance to play the audio and video represented by the audio playing instruction. When there is no currently idle first audio playing instance in the audio playing instance pool, or there is no already created first audio playing instance in the audio playing instance pool, the terminal device may create a new first audio playing instance as the first target audio playing instance. And providing the first target audio playback instance to the application client. And the application client plays the audio and video information by using the first target audio playing instance. After the audio and video information is played, information for expressing the end of the audio and video playing can be sent to the terminal equipment. The terminal device determines whether to put the first target audio playing instance into an audio playing instance pool (i.e. a first audio playing instance queue). In particular, it may be determined whether a first pool of audio playback instances is full, and if the first pool of audio playback instances is full, it is determined that the first target audio playback instance cannot be placed into the pool of audio playback instances. If the first pool of audio playback instances is not full, it is determined that the first target audio playback instance can be placed into the pool of audio playback instances. When it is determined that the first target audio playback instance can be placed into the pool of audio playback instances, placing the first target audio playback instance into the pool of audio playback instances. Otherwise, the first target audio playing example is destroyed.
With continuing reference to fig. 3, a flow diagram of one embodiment of an audio information playback method in accordance with the present disclosure is shown. As shown in fig. 3, the audio information playing method includes the following steps:
step 301, receiving a playing instruction for playing the first audio information.
At step 302, it is determined whether there is a first audio playback instance that is currently idle.
Step 303, in response to determining that there is a currently idle first audio playing instance, taking the currently idle first audio playing instance as a first target audio playing instance, and playing the first audio information using the first target audio playing instance.
Steps 301 to 303 in the embodiment shown in fig. 3 are the same as or similar to steps 101 to 103 in the embodiment shown in fig. 1, and are not repeated here.
Step 304, in response to receiving a playing instruction for playing the second audio information during the process of playing the first audio information using the first target audio playing instance, pausing the playing of the first audio information using the first target audio playing instance.
The playing priority of the second audio information is higher than that of the first audio information.
In some application scenarios, the first audio information may be, for example, a piece of music or a video. The second audio information may be, for example, an instant voice communication, or an instant video communication. At this point, the playing of the first audio information using the first target audio playing instance may be paused.
In this embodiment, the pausing of the playing of the first audio information using the first target audio playing instance may be storing the first target audio playing instance in a first target audio playing instance queue. And sets its status attribute to pause. In addition, the first target audio playing instance may be associated with the paused first audio information in the instance pool.
Step 305, determining a second target audio playing instance for playing the second audio information, and playing the second audio information using the second target audio instance.
After receiving the playing instruction of the second audio information, the running of the first target audio playing instance may be paused, and then a second target audio playing instance for playing the second audio information is determined. For example, whether there is a pre-created free second target audio playback instance for playing the second audio information. In practice, it may first be determined whether there is a second audio playback instance queue matching the category of the second audio information according to the category. If yes, continuing to search whether a second audio playing example with the current state being an idle state exists in the second audio playing example queue. If the idle second audio playing instance exists, taking the idle second audio playing instance as a second target audio playing instance; and if the second audio playing instance does not exist, creating a second audio playing instance as a second target audio playing instance.
In some application scenarios, the operating system installed on the terminal device may be an iOS operating system, and in the iOS operating system, audio playing instance queues respectively corresponding to different applications need to be set. And the audio playing instances corresponding to different applications cannot communicate with each other.
In these application scenarios, after receiving a play instruction for playing the second audio information, an application category corresponding to the second audio information may be determined, and then a second audio play instance queue corresponding to the application category may be determined. And determining the second audio playing instance with the current state attribute being idle from the second audio playing instance queue to play the second audio information. And if no idle audio playing example exists, creating a second target audio playing example corresponding to the application type to play the second audio information.
Step 306, in response to determining that the playing of the second audio information is finished, continuing to play the first audio information using the first target audio playing instance.
In practice, after the second audio information playing task is finished, the terminal device may resume to continue executing the first audio information playing task. The terminal device can extract the first target audio playing instance associated with the first audio information from the first audio playing instance queue, and continue to play the first audio information.
Compared with the embodiment shown in fig. 1, the embodiment of the present application highlights that in the process of playing the first audio information, when the playing instruction of the second audio information is interrupted, the first target audio playing instance is paused to play the first audio information, the second target audio playing instance is determined, and the second audio information is played by using the second target audio playing instance; and in response to determining that the second audio information is played over, continuing to play the first audio information using the first target audio playback instance. Therefore, when the normally played audio information is interrupted by the third-party task, the operation of the audio playing example playing the audio information is paused, and after the third-party task is finished, the paused audio playing example is continuously used for playing the first audio information. The utilization rate of the audio information playing instance is improved. The method and the device reduce the abnormity caused by interruption of the third party application in the process of playing the first audio information, and improve the stability of the use of the audio unit.
Referring to fig. 4, a schematic flow chart of an audio information playing method according to the present disclosure is shown.
And according to the audio and video playing instruction, playing the first audio information by using the first target audio playing example. The first audio information here may correspond to the first application. In playing the first audio information using the first target audio playing instance, the playing process of the first audio information is interrupted by a third party. The third party may be that a play instruction for playing the second audio information is received. The second audio information may be audio information corresponding to a second application. The second audio information may be played at a higher priority than the first audio information. After receiving a play instruction for playing the second audio information, the first target audio playing instance may be returned to the audio playing instance pool corresponding to the first application. And associating the first audio information with the first target audio playback instance. After the third party interrupts the second audio information playing task, that is, after the second audio information playing task ends, the first target audio playing instance can be extracted from the instance pool according to the first audio information to continue playing the first audio information. And the paused audio and video (namely the first audio information) is resumed.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of an audio information playing apparatus, which corresponds to the embodiment of the method shown in fig. 1, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the audio information playing apparatus of the present embodiment includes: the receiving unit 501 determines a unit 502 and a playing unit 503. The receiving unit 501 is configured to receive a playing instruction for playing the first audio information; a determining unit 502, configured to determine whether there is a currently idle first target audio playback instance; the playing unit 503 is configured to, in response to determining that there is a currently idle first audio playing instance, regard the currently idle first audio playing instance as a first target audio playing instance, and play the first audio information using the first target audio playing instance.
In this embodiment, the specific processing of the determining unit 502 and the specific processing of the playing unit 503 of the receiving unit 501 of the audio information playing apparatus and the technical effects brought by the specific processing can refer to the related descriptions of step 101, step 102 and step 103 in the corresponding embodiment of fig. 1, and are not described herein again.
In some optional implementations of this embodiment, the audio information playing apparatus further includes a creating unit, where the creating unit is configured to: in response to determining that there is no currently idle first audio playback instance, creating an audio playback instance as a first target audio playback instance; playing the first audio information using the first target audio playing instance.
In some optional implementations of this embodiment, the playing unit is further configured to: in response to receiving a playing instruction for playing second audio information in the process of playing the first audio information by using the first target audio playing instance, pausing the playing of the first audio information by using the first target audio playing instance; wherein the playback priority of the second audio information is greater than the playback priority of the first audio information; and determining a second target audio playing example for playing second audio information, and playing the second audio information by using the second target audio playing example.
In some optional implementations of this embodiment, the playing unit is further configured to:
in response to determining that the second audio information playback is finished, continuing to play the first audio information using the first target audio playback instance.
In some optional implementations of this embodiment, the determining unit is further configured to: it is determined from a queue of preset first audio playback instances whether there is a currently idle first audio playback instance.
In some optional implementations of this embodiment, the audio information playing apparatus further includes an instance recycling unit. The example recovery unit was used to: in response to the first audio information playing ending, determining whether the first target audio playing instance can be placed in the queue; in response to determining that the first target audio playback instance can be placed in the queue, placing the first target audio playback instance in the queue, and setting a state attribute of the first target audio playback instance to idle.
Referring to fig. 6, fig. 6 illustrates an exemplary system architecture to which the audio information playing method of one embodiment of the present disclosure may be applied.
As shown in fig. 6, the system architecture may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 601, 602, 603 may interact with the server 605 via the network 604 to receive or send messages or the like. The terminal devices 601, 602, 603 may have various client applications installed thereon, such as a web browser application, a search-type application, and a news-information-type application. The client application in the terminal device 601, 602, 603 may receive the instruction of the user, and complete the corresponding function according to the instruction of the user, for example, add the corresponding information in the information according to the instruction of the user.
When the terminal device 601, 602, 603 is hardware, various electronic devices having a display screen and supporting web browsing may be provided, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio L layer III, motion Picture Experts compression standard Audio layer 3), MP4(Moving Picture Experts Group Audio L layer IV, motion Picture Experts compression standard Audio layer 4) players, laptop portable computers, desktop computers, and the like.
The server 605 may be a server providing various services, for example, receiving an information acquisition request sent by the terminal devices 601, 602, and 603, and acquiring the presentation information corresponding to the information acquisition request in various ways according to the information acquisition request. And the relevant data of the presentation information is sent to the terminal devices 601, 602, 603.
It should be noted that the audio information playing method provided by the embodiment of the present disclosure may be executed by a terminal device, and accordingly, the audio information playing apparatus may be disposed in the terminal device 601, 602, 603. In addition, the audio information playing method provided by the embodiment of the present disclosure may also be executed by the server 605, and accordingly, the audio information playing apparatus may be disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to fig. 7, shown is a schematic diagram of an electronic device (e.g., a terminal device or a server of fig. 6) suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, the electronic device may include a processing device (e.g., central processing unit, graphics processor, etc.) 701, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage device 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
In general, input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 707 including, for example, a liquid crystal display (L CD), speaker, vibrator, etc., storage devices 708 including, for example, magnetic tape, hard disk, etc., and communication devices 709. communication devices 709 may allow the electronic device to communicate wirelessly or wiredly with other devices to exchange data.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 708, or may be installed from the ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). examples of communications networks include local area networks ("L AN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a playing instruction for playing the first audio information; determining whether there is a currently idle first audio playback instance; in response to determining that there is a currently idle first audio playback instance, playing the first audio information using the first target audio playback instance, taking the currently idle first audio playback instance as a first target audio playback instance.
Computer program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including but not limited to AN object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
The flowchart and block diagrams in the figures 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 the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Here, the name of the unit does not constitute a limitation of the unit itself in some cases, and for example, the receiving unit may also be described as "a unit that receives a play instruction for playing the first audio information".
For example, without limitation, exemplary types of hardware logic that may be used include Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CP L D), and so forth.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (14)

1. An audio information playing method, comprising:
receiving a playing instruction for playing the first audio information;
determining whether there is a currently idle first audio playback instance;
in response to determining that there is a currently idle first audio playback instance, playing the first audio information using the first target audio playback instance, taking the currently idle first audio playback instance as a first target audio playback instance.
2. The method of claim 1, further comprising:
in response to determining that there is no currently idle first audio playback instance, creating an audio playback instance as a first target audio playback instance;
playing the first audio information using the first target audio playing instance.
3. The method of claim 1, further comprising:
in response to receiving a playing instruction for playing second audio information in the process of playing the first audio information by using the first target audio playing instance, pausing the playing of the first audio information by using the first target audio playing instance; wherein the playback priority of the second audio information is greater than the playback priority of the first audio information;
and determining a second target audio playing example for playing second audio information, and playing the second audio information by using the second target audio playing example.
4. The method of claim 3, further comprising:
in response to determining that the second audio information playback is finished, continuing to play the first audio information using the first target audio playback instance.
5. The method of claim 1, wherein the determining whether there is a currently idle first instance of audio playback comprises:
it is determined from a queue of preset first audio playback instances whether there is a currently idle first audio playback instance.
6. The method of claim 5, further comprising:
in response to the first audio information playing ending, determining whether the first target audio playing instance can be placed in the queue;
in response to determining that the first target audio playback instance can be placed in the queue, placing the first target audio playback instance in the queue, and setting a state attribute of the first target audio playback instance to idle.
7. An audio information playback apparatus, comprising:
the receiving unit is used for receiving a playing instruction for playing the first audio information;
a determining unit, configured to determine whether there is a currently idle first target audio playback instance;
and the playing unit is used for responding to the determination that the first audio playing example which is idle currently exists, taking the first audio playing example which is idle currently as a first target audio playing example, and playing the first audio information by using the first target audio playing example.
8. The apparatus of claim 7, further comprising a creating unit configured to:
in response to determining that there is no currently idle target audio playback instance, creating an audio playback instance as a first target audio playback instance;
playing the first audio information using the first target audio playing instance.
9. The apparatus of claim 7, wherein the playback unit is further configured to:
in response to receiving a playing instruction for playing second audio information in the process of playing the first audio information by using the first target audio playing instance, pausing the playing of the first audio information by using the first target audio playing instance; wherein the playback priority of the second audio information is greater than the playback priority of the first audio information;
and determining a second target audio playing example for playing second audio information, and playing the second audio information by using the second target audio playing example.
10. The apparatus of claim 9, wherein the playback unit is further configured to:
in response to determining that the second audio information playback is finished, continuing to play the first audio information using the first target audio playback instance.
11. The apparatus of claim 7, wherein the determining unit is further configured to:
it is determined from a queue of preset audio playback instances whether there is a currently idle target audio playback instance.
12. The apparatus of claim 11, further comprising a recovery unit to:
in response to the first audio information playing ending, determining whether the first target audio playing instance can be placed in the queue;
in response to determining that the first target audio playback instance can be placed in the queue, placing the first target audio playback instance in the queue and setting its attribute as free.
13. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202010262870.1A 2020-04-03 2020-04-03 Audio information playing method and device and electronic equipment Pending CN111460211A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010262870.1A CN111460211A (en) 2020-04-03 2020-04-03 Audio information playing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010262870.1A CN111460211A (en) 2020-04-03 2020-04-03 Audio information playing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111460211A true CN111460211A (en) 2020-07-28

Family

ID=71681680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010262870.1A Pending CN111460211A (en) 2020-04-03 2020-04-03 Audio information playing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111460211A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259744A (en) * 2021-05-13 2021-08-13 北京字跳网络技术有限公司 Video display method, device, equipment and medium
CN116700660A (en) * 2022-11-15 2023-09-05 荣耀终端有限公司 Audio playing method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9483785B1 (en) * 2012-05-07 2016-11-01 Amazon Technologies, Inc. Utilizing excess resource capacity for transcoding media
CN106330878A (en) * 2016-08-18 2017-01-11 乐视控股(北京)有限公司 Method and device for managing video streaming resolution
CN107920281A (en) * 2016-10-08 2018-04-17 北京小唱科技有限公司 A kind of network direct broadcasting video loading method and terminal
CN110062284A (en) * 2019-04-03 2019-07-26 北京字节跳动网络技术有限公司 Video broadcasting method, device and electronic equipment
CN110300328A (en) * 2018-03-21 2019-10-01 腾讯科技(深圳)有限公司 A kind of video playing control method, device and readable storage medium storing program for executing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9483785B1 (en) * 2012-05-07 2016-11-01 Amazon Technologies, Inc. Utilizing excess resource capacity for transcoding media
CN106330878A (en) * 2016-08-18 2017-01-11 乐视控股(北京)有限公司 Method and device for managing video streaming resolution
CN107920281A (en) * 2016-10-08 2018-04-17 北京小唱科技有限公司 A kind of network direct broadcasting video loading method and terminal
CN110300328A (en) * 2018-03-21 2019-10-01 腾讯科技(深圳)有限公司 A kind of video playing control method, device and readable storage medium storing program for executing
CN110062284A (en) * 2019-04-03 2019-07-26 北京字节跳动网络技术有限公司 Video broadcasting method, device and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259744A (en) * 2021-05-13 2021-08-13 北京字跳网络技术有限公司 Video display method, device, equipment and medium
CN113259744B (en) * 2021-05-13 2023-08-01 北京字跳网络技术有限公司 Video display method, device, equipment and medium
CN116700660A (en) * 2022-11-15 2023-09-05 荣耀终端有限公司 Audio playing method and electronic equipment

Similar Documents

Publication Publication Date Title
CN111291220B (en) Label display method and device, electronic equipment and computer readable medium
CN111580921B (en) Content creation method and device
CN112040330B (en) Video file processing method and device, electronic equipment and computer storage medium
CN110516159B (en) Information recommendation method and device, electronic equipment and storage medium
US20240127856A1 (en) Audio processing method and apparatus, and electronic device and storage medium
CN110958481A (en) Video page display method and device, electronic equipment and computer readable medium
EP4343583A1 (en) Text input method and apparatus, and electronic device and storage medium
CN111400625A (en) Page processing method and device, electronic equipment and computer readable storage medium
CN111459364A (en) Icon updating method and device and electronic equipment
CN111460211A (en) Audio information playing method and device and electronic equipment
CN111258736A (en) Information processing method and device and electronic equipment
CN111723309B (en) Method and device for web page searching
EP4134904A1 (en) Image special effect configuration method, image recognition method, apparatuses, and electronic device
US20240103802A1 (en) Method, apparatus, device and medium for multimedia processing
CN114201705A (en) Video processing method and device, electronic equipment and storage medium
WO2020233171A1 (en) Song list switching method, apparatus and system, terminal, and storage medium
CN111756953A (en) Video processing method, device, equipment and computer readable medium
CN111797353A (en) Information pushing method and device and electronic equipment
CN112307393A (en) Information issuing method and device and electronic equipment
EP4207775A1 (en) Method and apparatus for determining object addition mode, electronic device, and medium
CN113709573B (en) Method, device, equipment and storage medium for configuring video special effects
CN110619079B (en) Method and device for pushing information
CN110568976B (en) Method, device, equipment and storage medium for controlling application display
CN114038465A (en) Voice processing method and device and electronic equipment
WO2021018177A1 (en) Method and apparatus for text effect processing

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