[go: up one dir, main page]

TWI618390B - Gapless recording method on android system - Google Patents

Gapless recording method on android system Download PDF

Info

Publication number
TWI618390B
TWI618390B TW105102537A TW105102537A TWI618390B TW I618390 B TWI618390 B TW I618390B TW 105102537 A TW105102537 A TW 105102537A TW 105102537 A TW105102537 A TW 105102537A TW I618390 B TWI618390 B TW I618390B
Authority
TW
Taiwan
Prior art keywords
driver
microphone
external microphone
audio
smart device
Prior art date
Application number
TW105102537A
Other languages
Chinese (zh)
Other versions
TW201728150A (en
Inventor
洪永栓
Original Assignee
環旭電子股份有限公司
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 環旭電子股份有限公司 filed Critical 環旭電子股份有限公司
Priority to TW105102537A priority Critical patent/TWI618390B/en
Publication of TW201728150A publication Critical patent/TW201728150A/en
Application granted granted Critical
Publication of TWI618390B publication Critical patent/TWI618390B/en

Links

Landscapes

  • Telephone Function (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

本發明提供一種適用於安卓系統的無間隙錄音方法,所述安卓系統安裝於智能裝置,所述智能裝置具有內置麥克風,所述無間隙錄音方法用於智能裝置進行錄音的過程,此方法包括:智能裝置的驅動程式判斷智能裝置是否已插入外接麥克風;當驅動程式判斷智能裝置已插入外接麥克風時,驅動程式依據控制命令延遲將音訊路徑由內置麥克風切換為外接麥克風;智能裝置的驅動程式判斷智能裝置是否已拔除外接麥克風;以及當驅動程式判斷智能裝置已拔除外接麥克風時,驅動程式立即將音訊路徑由外接麥克風切換為內置麥克風。藉此,達到無間隙錄音的效果。 The present invention provides a gapless recording method suitable for an Android system. The Android system is installed in a smart device, and the smart device has a built-in microphone. The gapless recording method is used in a process of recording by a smart device, and the method includes: The driver of the smart device determines whether the smart device has been inserted into the external microphone; when the driver determines that the smart device has been inserted into the external microphone, the driver switches the audio path from the built-in microphone to the external microphone according to the control command delay; the smart device driver judges the smart Whether the device has been removed from the microphone; and when the driver determines that the smart device has been removed from the microphone, the driver immediately switches the audio path from the external microphone to the built-in microphone. Thereby, the effect of the gapless recording is achieved.

Description

適用於安卓系統的無間隙錄音方法 Clear gap recording method for Android

本發明有關於一種無間隙錄音方法,且特別是一種適用於安卓系統的無間隙錄音方法。 The invention relates to a gapless recording method, and in particular to a gapless recording method suitable for an Android system.

請參照圖1,圖1是傳統的安卓(Android)系統架構控制與管理錄音的示意圖。安裝安卓系統的裝置可被稱之為智能裝置(smart device),例如智能手持裝置。常見的智能手持裝置如智能手機、平板電腦。安卓系統由框架層(framework)100、硬體抽象層(Hardware Abstraction Layer,HAL)200與核心層(Kernel)300所建構。當應用於錄音時,音訊AU的來源可能是內置的麥克風或者是外接的麥克風。在當外接麥克風插拔時,往往會造成錄音中斷的問題。 Please refer to FIG. 1. FIG. 1 is a schematic diagram of a conventional Android (Android) system architecture control and management recording. A device that installs an Android system may be referred to as a smart device, such as a smart handheld device. Common smart handheld devices such as smartphones and tablets. The Android system is constructed by a framework 100, a hardware abstraction layer (HAL) 200, and a kernel layer (Kernel) 300. When applied to recording, the source of the audio AU may be a built-in microphone or an external microphone. When an external microphone is plugged and unplugged, it often causes a problem of interruption of recording.

詳細的說,依據安卓系統的設計,驅動程式(driver)31偵測到耳機麥克風插入的訊號時,驅動程式31通知系統(驅動程式31通知音訊硬體抽象層(audio HAL)21,然後音訊硬體抽象層21通知音訊管理器11)有外接麥克風插入,經過一段軟硬體的運算時間之後,驅動程式31才收到系統切換音訊路徑的控制命令SS,驅動程式31因此才能將音訊AU的來源由原本的內置麥克風切換到外接麥克風。簡言之,當外接麥克風插入智能裝置,安卓系統是在經過運算延遲的時間之後,產生控制命令SS以控制驅動程式31將音訊路徑由內置麥克風切換到外接麥克風。然而,當外接麥克風插入但未完全插入之前,可能音訊路徑已切換到外接麥克風, 故外接麥克風未完全插入之前仍有可能錄不到外接麥克風的聲音。在相反的情況,當外接麥克風拔出時,驅動程式31通知系統,系統會先通知各個應用程式,並通常在經過系統的運算延遲並再加上一個設定的延遲時間(如延遲一秒鐘)之後,才產生控制命令SS以通知驅動程式31進行音訊路徑的切換。然而,在這段期間,由於外接麥克風已經拔出,導致系統產生延遲的這段時間內,因為音訊AU的來源仍然是設定為外接麥克風,如此會記錄不到音訊AU的內容。 In detail, according to the design of the Android system, when the driver 31 detects the signal inserted into the earphone microphone, the driver 31 notifies the system (the driver 31 notifies the audio hardware abstract layer (audio HAL) 21, and then the audio is hard. The body abstraction layer 21 notifies the audio manager 11) that an external microphone is inserted. After a period of hardware and software operation, the driver 31 receives the control command SS for switching the audio path of the system, and the driver 31 can then source the audio AU. Switch from the original built-in microphone to an external microphone. In short, when the external microphone is inserted into the smart device, the Android system generates a control command SS to control the driver 31 to switch the audio path from the built-in microphone to the external microphone after the delay of the operation. However, the audio path may have been switched to an external microphone before the external microphone is plugged in but not fully inserted. Therefore, the external microphone may not be recorded before the external microphone is fully inserted. In the opposite case, when the external microphone is unplugged, the driver 31 notifies the system that the system will notify each application first, and usually delays the operation of the system and adds a set delay time (such as one second delay). Thereafter, the control command SS is generated to notify the driver 31 to switch the audio path. However, during this period, because the external microphone has been pulled out, the system is delayed, because the source of the audio AU is still set to an external microphone, so the content of the audio AU will not be recorded.

本發明實施例提供一種適用於安卓系統的無間隙錄音方法,不論外接麥克風是否插拔皆可達到無間隙錄音的效果。 The embodiment of the invention provides a gapless recording method suitable for the Android system, which can achieve the effect of no-gap recording regardless of whether the external microphone is plugged or unplugged.

本發明實施例提供一種適用於安卓系統的無間隙錄音方法,所述安卓系統安裝於智能裝置,所述智能裝置具有內置麥克風,所述無間隙錄音方法用於智能裝置進行錄音的過程,此方法包括:智能裝置的驅動程式判斷智能裝置是否已插入外接麥克風;當驅動程式判斷智能裝置已插入外接麥克風時,驅動程式依據控制命令延遲將音訊路徑由內置麥克風切換為外接麥克風,以確保外接麥克風完全插入智能裝置後才開始錄音;智能裝置的驅動程式判斷智能裝置是否已拔除外接麥克風;以及當驅動程式判斷智能裝置已拔除外接麥克風時,驅動程式立即將音訊路徑由外接麥克風切換為內置麥克風。 An embodiment of the present invention provides a gapless recording method suitable for an Android system. The Android system is installed in a smart device, and the smart device has a built-in microphone, and the gapless recording method is used for a process of recording by a smart device. Including: the driver of the smart device determines whether the smart device has been inserted into the external microphone; when the driver determines that the smart device has been inserted into the external microphone, the driver switches the audio path from the built-in microphone to the external microphone according to the control command delay to ensure that the external microphone is completely The recording is started after the smart device is inserted; the driver of the smart device determines whether the smart device has been removed from the microphone; and when the driver determines that the smart device has been removed from the microphone, the driver immediately switches the audio path from the external microphone to the built-in microphone.

綜上所述,本發明實施例提供一種適用於安卓系統的無間隙錄音方法,不論在外接麥克風插入或拔除時,系統都可以持續錄音。使用者使用安卓系統進行錄音時,不會因為切換錄音的裝置而間斷錄音的音訊內容。因此,不會有錄音中斷而造成失去重要的資訊的問題。此外,利用所述無間隙錄音方法,因為錄音的內容是連續沒有音訊中斷的情況,如此也可避免使用者聽到重播的錄音時因聲音中斷變化而產生的不適感。 In summary, the embodiment of the present invention provides a gapless recording method suitable for an Android system, and the system can continuously record whether the external microphone is inserted or removed. When the user uses the Android system to record, the recorded audio content will not be interrupted due to the device that switches the recording. Therefore, there is no problem that the recording is interrupted and the important information is lost. In addition, with the gapless recording method, since the content of the recording is continuous without audio interruption, it is also possible to prevent the user from feeling uncomfortable due to the change of the sound interruption when the replayed recording is heard.

為使能更進一步瞭解本發明之特徵及技術內容,請參閱以下有關本發明之詳細說明與附圖,但是此等說明與所附圖式僅係用來說明本發明,而非對本發明的權利範圍作任何的限制。 The detailed description of the present invention and the accompanying drawings are to be understood by the claims The scope is subject to any restrictions.

100‧‧‧框架層 100‧‧‧Frame layer

11‧‧‧音訊管理器 11‧‧‧Optical Manager

200‧‧‧硬體抽象層 200‧‧‧ hardware abstraction layer

21‧‧‧音訊硬體抽象層 21‧‧‧Audio hardware abstraction layer

300‧‧‧核心層 300‧‧‧ core layer

31‧‧‧驅動程式 31‧‧‧Driver

AU‧‧‧音訊 AU‧‧‧ audio

SS‧‧‧控制命令 SS‧‧‧ control order

4‧‧‧智能裝置 4‧‧‧Smart devices

5‧‧‧外接麥克風 5‧‧‧External microphone

INT‧‧‧中斷訊號 INT‧‧‧ interrupt signal

S110、S120、S130、S140、S510、S520、S530、S540、S550、S610、S620、S630、S640‧‧‧步驟 Steps S110, S120, S130, S140, S510, S520, S530, S540, S550, S610, S620, S630, S640‧‧

圖1是傳統的安卓系統架構控制與管理錄音的示意圖。 FIG. 1 is a schematic diagram of a conventional Android system architecture control and management recording.

圖2是本發明實施例的安卓系統架構應用於控制與管理錄音的示意圖。 2 is a schematic diagram of an Android system architecture applied to control and manage recordings according to an embodiment of the present invention.

圖3是本發明實施例提供的智能裝置與外接麥克風的示意圖。 FIG. 3 is a schematic diagram of a smart device and an external microphone according to an embodiment of the present invention.

圖4是本發明實施例提供的適用於安卓系統的無間隙錄音方法的流程圖。 FIG. 4 is a flowchart of a gapless recording method suitable for an Android system according to an embodiment of the present invention.

圖5是本發明另一實施例提供的適用於安卓系統的無間隙錄音方法在判斷是否插入外接麥克風的一種應用情況的流程圖。 FIG. 5 is a flowchart of an application scenario of a gapless recording method suitable for an Android system for determining whether to insert an external microphone according to another embodiment of the present invention.

圖6是本發明另一實施例提供的適用於安卓系統的無間隙錄音方法在判斷是否拔除外接麥克風的一種應用情況的流程圖。 FIG. 6 is a flowchart of an application situation of a gapless recording method suitable for an Android system for determining whether to remove an external microphone according to another embodiment of the present invention.

〔適用於安卓系統的無間隙錄音方法之實施例〕 [Embodiment for a gapless recording method for Android]

請參照圖2,圖2是本發明實施例的安卓系統架構應用於控制與管理錄音的示意圖。適用於安卓系統的無間隙錄音方法,所述安卓系統安裝於智能裝置,所述智能裝置具有內置麥克風。所述智能裝置例如為智能手持裝置,如智能手機或平板電腦,但本發明並不因此限定。請一併參照圖3,圖3是本發明實施例提供的智能裝置與外接麥克風的示意圖。當本實施例的無間隙錄音方法應用於使用安卓系統的智能裝置4時,智能裝置4為智能手持裝置,如智能手機。外接麥克風5例如是耳機麥克風(ear microphone),但本發明並不因此限定。本發明也不限定外接麥克風的種類。 Please refer to FIG. 2. FIG. 2 is a schematic diagram of an Android system architecture applied to control and manage recordings according to an embodiment of the present invention. A gapless recording method suitable for Android systems, the Android system being installed on a smart device having a built-in microphone. The smart device is, for example, a smart handheld device such as a smart phone or a tablet, but the invention is not limited thereby. Please refer to FIG. 3 together. FIG. 3 is a schematic diagram of an intelligent device and an external microphone according to an embodiment of the present invention. When the gapless recording method of the present embodiment is applied to the smart device 4 using the Android system, the smart device 4 is a smart handheld device such as a smart phone. The external microphone 5 is, for example, an ear microphone, but the present invention is not limited thereto. The invention is also not limited to the type of external microphone.

安卓系統包括框架層(framework)100、硬體抽象層(Hardware Abstraction Layer,HAL)200與核心層(Kernel)300。對於錄音的功能而言,框架層100具有音訊管理器11,抽象層200具有音訊硬體抽象層21,核心層300具有驅動程式31。位於核心層300的驅動程式接收麥克風裝置的音訊AU,音訊AU的來源依據所切換使用的麥克風裝置而決定。所述麥克風裝置包括內置麥克風與外接麥克風5,在圖3中未繪示智能裝置4的內置麥克風,因為通常內置麥克風為隱藏式設計。外接麥克風5的插拔會使得音訊連接端子的電性狀態產生改變,音訊連接端子的電性狀態在外接麥克風5插入時和拔除時兩者並不相同。音訊連接端子電性連接驅動程式31,使得驅動程式31獲得中斷訊號(interrupt)INT,依據中斷訊號的內容驅動程式31可知外接麥克風5是插入或者是拔除。驅動程式31則可依據中斷訊號INT而決定並切換音訊路徑。驅動程式31將音訊AU傳遞至位於硬體抽象層200的音訊硬體抽象層21,再傳送至位於框架層100的音訊管理器11。此外,當驅動程式31判斷智能裝置4已插入或拔除外接麥克風5時,驅動程式31通知音訊管理器11音訊裝置變動,驅動程式31也可依據來自音訊硬體抽象層21的控制命令SS而切換音訊路徑。音訊管理器11產生傳送控制命令SS至音訊硬體抽象層21,再傳送至驅動程式31藉此控制驅動程式31以切換音訊路徑。簡單的說,音訊管理器11可用於經由音訊硬體抽象層21控制驅動程式31切換音訊路徑,並接收且紀錄經由音訊路徑所傳達的音訊。然而,使用本實施例的無間隙錄音方法,在外接麥克風5插入智能裝置4時,驅動程式31延遲切換音訊路徑,且在外接麥克風(5)拔除時,驅動程式31不需等待來自上層的控制命令SS而立即切換音訊路徑。詳細的實施方式請參照以下的說明。 The Android system includes a framework 100, a hardware abstraction layer (HAL) 200, and a kernel layer (Kernel) 300. For the function of recording, the frame layer 100 has an audio manager 11, the abstraction layer 200 has an audio hardware abstraction layer 21, and the core layer 300 has a driver 31. The driver located in the core layer 300 receives the audio AU of the microphone device, and the source of the audio AU is determined according to the microphone device used for switching. The microphone device includes a built-in microphone and an external microphone 5, and the built-in microphone of the smart device 4 is not shown in FIG. 3 because the built-in microphone is usually a hidden design. The plugging and unplugging of the external microphone 5 causes a change in the electrical state of the audio connecting terminal, and the electrical state of the audio connecting terminal is not the same when the external microphone 5 is inserted and when the external microphone 5 is inserted. The audio connection terminal is electrically connected to the driver 31, so that the driver 31 obtains an interrupt INT. According to the content of the interrupt signal driver 31, the external microphone 5 is inserted or removed. The driver 31 can determine and switch the audio path according to the interrupt signal INT. The driver 31 passes the audio AU to the audio hardware abstraction layer 21 located at the hardware abstraction layer 200, and then to the audio manager 11 located at the frame layer 100. In addition, when the driver 31 determines that the smart device 4 has inserted or removed the microphone 5, the driver 31 notifies the audio manager 11 of the audio device change, and the driver 31 can also switch according to the control command SS from the audio hardware abstraction layer 21. Audio path. The audio manager 11 generates a transfer control command SS to the audio hardware abstraction layer 21, and then transmits it to the driver 31 to thereby control the driver 31 to switch the audio path. Briefly, the audio manager 11 can be used to control the driver 31 to switch the audio path via the audio hardware abstraction layer 21, and to receive and record the audio transmitted via the audio path. However, with the gapless recording method of the present embodiment, when the external microphone 5 is inserted into the smart device 4, the driver 31 delays switching the audio path, and when the external microphone (5) is removed, the driver 31 does not have to wait for control from the upper layer. Command the SS and immediately switch the audio path. For the detailed implementation, please refer to the following instructions.

請同時參照圖2與圖4,圖4是本發明實施例提供的適用於安卓系統的無間隙錄音方法的流程圖。所述無間隙錄音方法用於智 能裝置進行錄音的過程,此方法包括以下步驟。在步驟S110中,智能裝置位於核心層300的驅動程式31判斷智能裝置是否已插入外接麥克風。當驅動程式31判斷智能裝置已插入外接麥克風時,進行步驟S120,驅動程式31依據控制命令延遲將音訊路徑由內置麥克風切換為外接麥克風。所述控制命令是圖2的來自音訊管理器11並通過音訊硬體抽象層21所傳達的控制命令SS。所述驅動程式31的延遲是設定用於等待外接麥克風完全插入至智能裝置的等待時間,但本發明並不限定驅動程式31的延遲時間長度,其可以依據設計需要而調整。透過此驅動程式適當的延遲,使外接麥克風插入的過程中(即收到中斷訊號INT)時,到外接麥克風完全插入前,系統維持以內置麥克風進行錄音,而不會有錄音中斷的情況,且在外接麥克風完全插入後,才以外接麥克風進行錄音。另外,當在步驟S110中,驅動程式31判斷智能裝置未插入外接麥克風時,重複步驟S110,以持續進行判斷。 Please refer to FIG. 2 and FIG. 4 simultaneously. FIG. 4 is a flowchart of a gapless recording method suitable for an Android system according to an embodiment of the present invention. The gapless recording method is used for wisdom The process of recording the device, the method includes the following steps. In step S110, the driver 31 of the smart device located at the core layer 300 determines whether the smart device has been inserted into the external microphone. When the driver 31 determines that the smart device has been inserted into the external microphone, proceeding to step S120, the driver 31 switches the audio path from the built-in microphone to the external microphone according to the control command delay. The control command is the control command SS from the audio manager 11 of FIG. 2 and communicated by the audio hardware abstraction layer 21. The delay of the driver 31 is set to wait for the external microphone to be fully inserted into the smart device, but the present invention does not limit the delay time of the driver 31, which can be adjusted according to design requirements. Through the appropriate delay of the driver, when the external microphone is inserted (that is, the interrupt signal INT is received), the system maintains the recording with the built-in microphone until the external microphone is fully inserted, without the interruption of the recording, and After the external microphone is fully inserted, the external microphone is used for recording. In addition, when the driver 31 determines in step S110 that the smart device is not plugged into the external microphone, step S110 is repeated to continue the determination.

在步驟S120之後,接著進行步驟S130,智能裝置的驅動程式31判斷智能裝置是否已拔除外接麥克風。當驅動程式31判斷智能裝置已拔除外接麥克風時,進行步驟S140,驅動程式31立即將音訊路徑由外接麥克風切換為內置麥克風。反之,當驅動程式31判斷智能裝置尚未拔除外接麥克風時,重複步驟S130,以持續進行判斷。詳細的說,在步驟S130中,當驅動程式偵測到外接麥克風拔除時所產生的中斷訊號INT,驅動程式31通知系統的上層(框架層100與硬體抽象層200),即驅動程式31通知音訊管理器11音訊裝置變動,但是也立即切換音訊路徑由外接麥克風到內置麥克風。基於安卓系統的架構,除了系統運算時間之外,大約經過1~2秒鐘後,系統上層的音訊管理器11才產生控制命令SS通知驅動程式31切換音訊路徑。然而,在驅動程式31接收到控制命令SS前,驅動程式31已先將音訊路徑切換到內置麥克風,以避免錄音中斷的情況。另外,當驅動程式31接收到音訊管理器11 的控制命令SS後,也可再根據控制命令SS調整音訊的參數,例如調整音訊的強度或音質等等。藉此,可做音訊的微調。由此可知,當外接麥克風由智能裝置拔出時,驅動程式31對於音訊路徑的切換不會因等待系統上層的控制命令SS而產生延遲(包括系統運算延遲與1~2秒鐘的延遲),進而造成錄音中斷。依據上述,本實施例的驅動程式31可依據外接麥克風拔除的中斷訊號INT立即切換音訊路徑,即不須透過如圖2的音訊管理器11及音訊硬體抽象層21的控制命令SS來切換音訊路徑。故在外接麥克風拔除時,音訊路徑立即被切換至內置麥克風,藉此,外接麥克風拔除的過程中所錄到的聲音並不會有所中斷。 After step S120, proceeding to step S130, the driver 31 of the smart device determines whether the smart device has been detached from the microphone. When the driver 31 determines that the smart device has been detached from the microphone, the process proceeds to step S140, and the driver 31 immediately switches the audio path from the external microphone to the built-in microphone. On the other hand, when the driver 31 determines that the smart device has not been removed from the microphone, step S130 is repeated to continue the determination. In detail, in step S130, when the driver detects the interrupt signal INT generated when the external microphone is removed, the driver 31 notifies the upper layer of the system (the frame layer 100 and the hardware abstraction layer 200), that is, the driver 31 notifies The audio manager 11 audio device changes, but also immediately switches the audio path from the external microphone to the built-in microphone. Based on the architecture of the Android system, in addition to the system operation time, after about 1~2 seconds, the audio manager 11 of the upper layer of the system generates a control command SS to notify the driver 31 to switch the audio path. However, before the driver 31 receives the control command SS, the driver 31 has first switched the audio path to the built-in microphone to avoid interruption of the recording. In addition, when the driver 31 receives the audio manager 11 After the control command SS, the parameters of the audio can also be adjusted according to the control command SS, such as adjusting the strength or sound quality of the audio. In this way, fine tuning of the audio can be done. Therefore, when the external microphone is pulled out by the smart device, the switching of the audio path by the driver 31 is not delayed by waiting for the control command SS of the upper layer of the system (including the system operation delay and the delay of 1 to 2 seconds). This caused the recording to be interrupted. According to the above, the driver 31 of the embodiment can immediately switch the audio path according to the interrupt signal INT extracted by the external microphone, that is, the audio command is not required to be switched through the control command SS of the audio manager 11 and the audio hardware abstraction layer 21 of FIG. path. Therefore, when the external microphone is removed, the audio path is immediately switched to the built-in microphone, so that the sound recorded during the external microphone removal is not interrupted.

值得一提的是,圖4的流程中的步驟S110用於判斷外接麥克風是否已插入,而步驟S130用於判斷外接麥克風是否已拔除,在實際應用時,步驟S110和S130的次序並不因此限定。當無外接麥克風時,智能裝置的驅動程式31可以反覆地進行步驟S110以持續判斷是否有外接麥克風插入。當智能裝置已插入外接麥克風時,驅動程式31可以反覆地進行步驟S130以持續判斷外接麥克風是否被拔除。圖4的流程架構用以說明本發明的步驟流程的主要精神,本發明並不因此限定步驟S110和步驟S130的使用次序和執行時機。基於圖4的流程架構,以下將分別以外接麥克風插入和外接麥克風拔除這兩種應用情況分別提供兩個實施例以幫助說明。 It is to be noted that the step S110 in the process of FIG. 4 is used to determine whether the external microphone has been inserted, and the step S130 is used to determine whether the external microphone has been removed. In actual application, the order of steps S110 and S130 is not limited. . When there is no external microphone, the driver 31 of the smart device can repeatedly perform step S110 to continuously determine whether an external microphone is inserted. When the smart device has inserted the external microphone, the driver 31 can repeatedly perform step S130 to continuously determine whether the external microphone is removed. The flow diagram of FIG. 4 is used to illustrate the main spirit of the flow of steps of the present invention, and the present invention does not thus limit the order of use and timing of execution of steps S110 and S130. Based on the flow architecture of FIG. 4, two embodiments are separately provided for the external microphone insertion and the external microphone extraction, respectively, to provide two embodiments to help illustrate.

請同時參照圖2與圖5,圖5是本發明另一實施例提供的適用於安卓系統的無間隙錄音方法在判斷是否插入外接麥克風的一種應用情況的流程圖。在步驟S510中,驅動程式31判斷是否接收到中斷訊號INT。若接收到中斷訊號INT並確認中斷訊號是代表外接麥克風已插入,則進行步驟S520,通知系統(的上層)音訊裝置變動,也就是通知硬體抽象層21然後再經由硬體抽象層21通知音訊管理器11。接著,進行步驟S530,判斷系統(的上層)是否 通知將音訊路徑切換至外接麥克風。若系統要通知驅動程式將音訊路徑切換至外接麥克風,則進行步驟S540,驅動程式延遲切換,然後才進行步驟S550,驅動程式將音訊路徑切換至外接麥克風。步驟S540的驅動程式延遲是設定用於等待外接麥克風完全插入至智能裝置的等待時間,其可以依據設計需要而調整,本發明並不限定此驅動程式延遲的時間長度。此驅動程式延遲切換,目的在使外接麥克風插入的過程(即收到中斷訊號INT)時,到外接麥克風完全插入前,系統維持以內置麥克風進行錄音,且在外接麥克風完全插入後,才以外接麥克風進行錄音。 Please refer to FIG. 2 and FIG. 5 simultaneously. FIG. 5 is a flow chart of an application situation of the gapless recording method for the Android system in determining whether to insert an external microphone according to another embodiment of the present invention. In step S510, the driver 31 determines whether the interrupt signal INT is received. If the interrupt signal INT is received and the interrupt signal is confirmed to indicate that the external microphone has been inserted, step S520 is performed to notify the (upper layer) audio device of the system to change, that is, notify the hardware abstraction layer 21 and then notify the audio via the hardware abstraction layer 21. Manager 11. Next, proceeding to step S530, determining whether the upper layer of the system is The notification switches the audio path to an external microphone. If the system wants to notify the driver to switch the audio path to the external microphone, proceed to step S540, the driver delays switching, and then proceeds to step S550, the driver switches the audio path to the external microphone. The driver delay of step S540 is set to wait for the external microphone to be fully inserted into the smart device, which can be adjusted according to design requirements, and the present invention does not limit the length of time for the driver to delay. The driver delays switching. The purpose is to insert the external microphone (ie, receive the interrupt signal INT). Before the external microphone is fully inserted, the system maintains the recording with the built-in microphone, and the external microphone is completely inserted. The microphone is used for recording.

接著,請同時參照圖2與圖6,圖6是本發明另一實施例提供的適用於安卓系統的無間隙錄音方法在判斷是否拔除外接麥克風的一種應用情況的流程圖。在步驟S610中,驅動程式31判斷是否接收到中斷訊號INT。若接收到中斷訊號INT並確認中斷訊號是代表外接麥克風已被拔除,則進行步驟S620,驅動程式31通知系統的音訊管理器11音訊裝置變動,且將音訊路徑立即切換至內置麥克風。接著,進行步驟S630,判斷系統(的上層)是否通知切換至內置麥克風。若系統通知要切換至內置麥克風,則音訊管理器11傳送控制命令SS至驅動程式31,接著,再進行步驟S640。然而,在驅動程式31接收到音訊管理器11傳送的控制命令SS前,在步驟S620中驅動程式31已將音訊路徑切換至內置麥克風,以使錄到的聲音不會中斷。在步驟S640中,可根據控制命令SS調整音訊參數,諸如音訊的強度或音質等等。詳細的說,音訊管理器11傳送的控制命令SS中可以包括讓驅動程式31調整音訊的參數的命令。然而,本發明不限定調整音訊的控制命令的內容與格式。 Next, please refer to FIG. 2 and FIG. 6 at the same time. FIG. 6 is a flowchart of an application situation of the gapless recording method suitable for the Android system in determining whether to remove the mic microphone according to another embodiment of the present invention. In step S610, the driver 31 determines whether the interrupt signal INT is received. If the interrupt signal INT is received and the interrupt signal is confirmed to indicate that the external microphone has been removed, then in step S620, the driver 31 notifies the system of the audio manager 11 of the audio device to change, and immediately switches the audio path to the built-in microphone. Next, proceeding to step S630, it is determined whether or not the upper layer of the system is notified to switch to the built-in microphone. If the system notifies that it is to switch to the built-in microphone, the audio manager 11 transmits the control command SS to the driver 31, and then proceeds to step S640. However, before the driver 31 receives the control command SS transmitted by the audio manager 11, the driver 31 has switched the audio path to the built-in microphone in step S620 so that the recorded sound is not interrupted. In step S640, the audio parameters, such as the intensity or sound quality of the audio, etc., may be adjusted according to the control command SS. In detail, the control command SS transmitted by the audio manager 11 may include a command for causing the driver 31 to adjust the parameters of the audio. However, the present invention does not limit the content and format of the control commands for adjusting the audio.

由以上圖5和圖6的兩個實施例可以明顯知道,本實施例的無間隙錄音方法的驅動程式31在外接麥克風插入時延遲切換音訊路徑以等待外接麥克風完全插入,且在外接麥克風拔除時不需等 待上層的控制命令SS即可先行切換音訊路徑。驅動程式31也能依據上層的控制命令調整音訊參數。 It can be clearly seen from the two embodiments of FIG. 5 and FIG. 6 that the driver 31 of the gapless recording method of the present embodiment delays switching the audio path when the external microphone is inserted to wait for the external microphone to be fully inserted, and when the external microphone is removed. No need to wait The upper layer control command SS can switch the audio path first. The driver 31 can also adjust the audio parameters according to the upper layer control commands.

〔實施例的可能功效〕 [Possible effects of the examples]

綜上所述,本發明實施例所提供的適用於安卓系統的無間隙錄音方法不論在外接麥克風插入或拔除時,都可以讓安卓系統持續錄音。因為驅動程式在外接麥克風插入時延遲切換音訊路徑以等待外接麥克風完全插入,且在外接麥克風拔除時不需等待系統上層的命令才做音訊路徑的切換,讓使用者使用安卓系統進行錄音時,不會因為切換錄音的裝置(外接麥克風或內置麥克風)而間斷錄音的音訊內容,藉此達到全程錄音。因此,不會有錄音中斷而造成失去重要的資訊的問題。此外,利用所述無間隙錄音方法,因為錄音的內容是連續沒有音訊中斷的情況,故也可避免使用者聽到重播的錄音時因聲音中斷變化而產生的不適感。 In summary, the seamless recording method for the Android system provided by the embodiment of the present invention allows the Android system to continuously record whether the external microphone is inserted or removed. Because the driver delays switching the audio path when the external microphone is inserted to wait for the external microphone to be fully inserted, and does not need to wait for the command of the upper layer of the system to switch the audio path when the external microphone is removed, so that the user does not use the Android system for recording, The recorded audio content is interrupted by the device that switches the recording (external microphone or built-in microphone), thereby achieving full recording. Therefore, there is no problem that the recording is interrupted and the important information is lost. In addition, with the gapless recording method, since the content of the recording is continuous without audio interruption, it is also possible to prevent the user from feeling uncomfortable due to a change in the sound interruption when the replayed recording is heard.

以上所述僅為本發明之實施例,其並非用以侷限本發明之專利範圍。 The above description is only an embodiment of the present invention, and is not intended to limit the scope of the invention.

Claims (10)

一種適用於安卓系統的無間隙錄音方法,該安卓系統安裝於一智能裝置,該智能裝置具有一內置麥克風,該無間隙錄音方法用於該智能裝置以該內置麥克風進行錄音的過程,該無間隙錄音方法包括:該智能裝置的一驅動程式判斷該智能裝置是否已插入一外接麥克風;以及當該驅動程式判斷該智能裝置已插入該外接麥克風時,該驅動程式依據一控制命令延遲將一音訊路徑由該內置麥克風切換為該外接麥克風,其中所述延遲是等待該外接麥克風完全插入至該智能裝置的一等待時間,以使該外接麥克風插入的過程中,到該外接麥克風完全插入前,維持以該內置麥克風進行錄音,且在該外接麥克風完全插入後,才以該外接麥克風進行錄音。 A gapless recording method suitable for the Android system, the Android system is installed in a smart device, the smart device has a built-in microphone, and the gapless recording method is used in the process of recording the smart device with the built-in microphone, the gapless process The recording method includes: a driver of the smart device determines whether the smart device has inserted an external microphone; and when the driver determines that the smart device has been inserted into the external microphone, the driver delays an audio path according to a control command Switching to the external microphone by the built-in microphone, wherein the delay is a waiting time for the external microphone to be fully inserted into the smart device, so that the external microphone is inserted, and the external microphone is maintained until the external microphone is fully inserted. The built-in microphone is used for recording, and the external microphone is used for recording after the external microphone is fully inserted. 根據請求項第1項所述之適用於安卓系統的無間隙錄音方法,還包括:該智能裝置的該驅動程式判斷該智能裝置是否已拔除該外接麥克風;以及當該驅動程式判斷該智能裝置已拔除該外接麥克風時,該驅動程式立即將該音訊路徑由該外接麥克風切換為該內置麥克風。 The gapless recording method for the Android system according to Item 1 of the claim, further comprising: the driver of the smart device determining whether the smart device has been detached from the external microphone; and when the driver determines that the smart device has When the external microphone is removed, the driver immediately switches the audio path from the external microphone to the built-in microphone. 根據請求項第1項所述之適用於安卓系統的無間隙錄音方法,其中該控制命令由一音訊管理器產生,且經由一音訊硬體抽象層傳送至該驅動程式。 The gapless recording method for Android system according to Item 1 of the claim, wherein the control command is generated by an audio manager and transmitted to the driver via an audio hardware abstraction layer. 根據請求項第3項所述之適用於安卓系統的無間隙錄音方法,其中該音訊管理器位於該安卓系統的一框架層。 The gapless recording method for Android system according to Item 3 of the claim, wherein the audio manager is located at a frame layer of the Android system. 根據請求項第3項所述之適用於安卓系統的無間隙錄音方法,其中該音訊硬體抽象層位於該安卓系統的一硬體抽象層。 The gapless recording method for Android system according to Item 3 of the claim, wherein the audio hardware abstraction layer is located in a hardware abstraction layer of the Android system. 根據請求項第1項所述之適用於安卓系統的無間隙錄音方法,更包括: 當該驅動程式判斷該智能裝置已插入該外接麥克風時,該驅動程式通知一音訊管理器音訊裝置變動。 According to the claim 1, the seamless recording method for Android system includes: When the driver determines that the smart device has been inserted into the external microphone, the driver notifies an audio manager of the audio device to change. 根據請求項第2項所述之適用於安卓系統的無間隙錄音方法,更包括:當該驅動程式判斷該智能裝置已拔除該外接麥克風時,該驅動程式通知一音訊管理器音訊裝置變動。 According to the second aspect of the present invention, the gapless recording method for the Android system further includes: when the driver determines that the smart device has removed the external microphone, the driver notifies an audio manager of the audio device to change. 根據請求項第7項所述之適用於安卓系統的無間隙錄音方法,在當該驅動程式判斷該智能裝置已拔除該外接麥克風時,該驅動程式通知該音訊管理器音訊裝置變動的步驟之後,更包括:該音訊管理器傳送該控制命令至該驅動程式以調整音訊的參數。 According to the gapless recording method for Android system described in Item 7 of the claim, after the driver determines that the smart device has removed the external microphone, the driver notifies the audio manager of the change of the audio device. The method further includes: the audio manager transmitting the control command to the driver to adjust parameters of the audio. 根據請求項第1項所述之適用於安卓系統的無間隙錄音方法,其中該外接麥克風是耳機麥克風。 The gapless recording method for Android system according to Item 1 of the claim, wherein the external microphone is a headphone microphone. 根據請求項第1項所述之適用於安卓系統的無間隙錄音方法,其中該智能裝置是智能手持裝置。 The gapless recording method for Android system according to Item 1 of the claim, wherein the smart device is a smart handheld device.
TW105102537A 2016-01-27 2016-01-27 Gapless recording method on android system TWI618390B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105102537A TWI618390B (en) 2016-01-27 2016-01-27 Gapless recording method on android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105102537A TWI618390B (en) 2016-01-27 2016-01-27 Gapless recording method on android system

Publications (2)

Publication Number Publication Date
TW201728150A TW201728150A (en) 2017-08-01
TWI618390B true TWI618390B (en) 2018-03-11

Family

ID=60186496

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105102537A TWI618390B (en) 2016-01-27 2016-01-27 Gapless recording method on android system

Country Status (1)

Country Link
TW (1) TWI618390B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101778333B (en) * 2010-01-27 2013-01-16 杭州华三通信技术有限公司 Detection method and device of microphone state
TW201438478A (en) * 2013-03-22 2014-10-01 Realtek Semiconductor Corp Microphone detection and selection circuit and method
US20140294196A1 (en) * 2013-04-02 2014-10-02 Samsung Electronics Co., Ltd. User device having plurality of microphones and operating method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101778333B (en) * 2010-01-27 2013-01-16 杭州华三通信技术有限公司 Detection method and device of microphone state
TW201438478A (en) * 2013-03-22 2014-10-01 Realtek Semiconductor Corp Microphone detection and selection circuit and method
US20140294196A1 (en) * 2013-04-02 2014-10-02 Samsung Electronics Co., Ltd. User device having plurality of microphones and operating method thereof

Also Published As

Publication number Publication date
TW201728150A (en) 2017-08-01

Similar Documents

Publication Publication Date Title
US20180012581A1 (en) External extended device and audio playback method
WO2015055053A1 (en) Method, device and terminal for switching playback mode
CN106851488B (en) Audio output control method, device and circuit
CN113038317B (en) Earphone control method and device, bluetooth earphone and storage medium
CN108184164A (en) Audio frequency playing method, smart television and computer readable storage medium
JP2018509110A (en) Multi-view streaming service providing method and apparatus
WO2017181708A1 (en) Audio switching method and device for terminal, and electronic device
CN110087215B (en) Information broadcasting method, device, terminal and storage medium based on Bluetooth connection
WO2020038344A1 (en) Method and device for audio and video synchronization, and display apparatus
JP2018512813A (en) Earphone status detection method and terminal
WO2017148270A1 (en) Volume control method and device, and terminal
CN115442777A (en) Screen projection method and device in wireless terminal, wireless terminal and storage medium
WO2017176728A1 (en) Streaming synchronized media content to separate devices
US9247191B2 (en) Wireless external multi-microphone system for mobile device environment
CN101610406A (en) A video switching method and device
CN115802087B (en) Sound and picture synchronous processing method and related equipment thereof
JP6563138B2 (en) Head mounted display device and head mounted display system
CN107018465A (en) Suitable for the gapless way of recording of Android system
TWI618390B (en) Gapless recording method on android system
CN115623278A (en) Audio processing method, apparatus, device and medium
CN103327364B (en) A kind of radio transmitting method for audio and video playing and device
TWI583168B (en) A phone and the system and method of playing music during a call
CN105992054A (en) Intelligent television playing method and playing device
WO2024082855A1 (en) Audio service processing method, electronic device, and computer storage medium
US20220382535A1 (en) Consumer device firmware updating via hdmi