• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            天行健 君子當自強而不息

            用DirectX Audio和DirectShow播放聲音和音樂(7)


            本篇是用DirectX Audio和DirectShow播放聲音和音樂(6)的續篇。



            加入到MP3的革命中

            MP3 是一種音頻壓縮格式,它通過刪除或修改音樂中不易被人耳察覺的部分來使音樂更小,占用的存儲空間更少。在項目中使用MP3(.MP3文件)需要使用 DirectX中的 DirectShow組件,在這個組件的幫助下,只需幾行短短的代碼,就能使用任意的MP3文件了(DirectShow也支持其他的媒體文件,比如 WMA,AVI,MPG等)。當然要想使用更多的媒體文件,必須已經在操作系統中安裝了解碼器。

            解碼器(codec)是一個程序,用于解碼或編碼一些指定的格式(比如MP3解碼器專門解碼.MP3文件)。通常可以從發明或者創建這種格式的公司中獲取這種格式的解碼器。比如,MP3解碼器來自于Fraunhofer Insitute。幸運的是,MP3解碼器等幾種比較流行的解碼器已經被集成到操作系統中(比如.mp3,.avi,.mpg等),而無需另外從 internet下載這些格式的解碼器了。

            要在項目中使用DirectShow,需要包含dshow.h頭文件,并且在鏈接庫中加入strmiids.lib。



            使用DirectShow

            DirectX是一組COM接口組件,DirectShow也不例外,DirectShow中經常使用的組件如下:

            IGraphBuilder:  幫助建立濾波圖,濾波過濾圖是一組對象或接口的集合,用于處理某種媒體文件。
            IMediaControl:控制數據在濾波圖中的流程,使用該接口控制音樂的回放。
            IMediaEvents:   從濾波圖中獲取事件及通告,當希望知道在濾波圖中發生了什么的時候這個對象很有用,比如希望知道一個音樂是否仍然在播放或者已經停止播放。

            其中第一個接口IGraphBuilder是比較重要的對象,其他對象都依賴于它,或者靠它創建。它創建濾波器,用于處理媒體問題,另外很多有用的功能也是依靠這個對象。

            This interface provides methods that enable an application to build a filter graph. The Filter Graph Manager implements this interface.

            IGraphBuilder inherits from the IFilterGraph interface. IFilterGraph provides basic operations, such as adding a filter to the graph or connecting two pins. IGraphBuilder adds further methods that construct graphs from partial information. For example, the IGraphBuilder::RenderFile method builds a graph for file playback, given the name of the file. The IGraphBuilder::Render method renders data from an output pin by connecting new filters to the pin.

            Using these methods, an application does not need to specify every filter and pin connection in the graph. Instead, the Filter Graph Manager selects filters that are registered on the user's system, adds them to the graph, and connects them. For more information, see Intelligent Connect.

            In addition to the methods inherited from IUnknown and IFilterGraph, the IGraphBuilder interface exposes the following methods.

            Method Description
            Connect Connects two pins. If they will not connect directly, this method connects them with intervening transforms.
            Render Adds a chain of filters to a specified output pin to render it.
            RenderFile Builds a filter graph that renders the specified file.
            AddSourceFilter Adds a source filter to the filter graph for a specific file.
            SetLogFile Sets the file for logging actions taken when attempting to perform an operation.
            Abort Requests that the graph builder return as soon as possible from its current task.
            ShouldOperationContinue Queries whether the current operation should continue.


            使用DirectShow播放MP3的第一步是調用 CoCreateInstance函數創建濾波圖對象IGraphBuilder。

                // initialize COM
                //
                // initialize the COM library on the current thread and identifies the concurrency model as single-thread
                // apartment (STA).
                CoInitialize(0);

                
            // create the DirectMusic performance object
                //
                // creates a single uninitialized object of the class associated with a specified CLSID.
                if(FAILED(CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, 
                                           (
            void**)&g_graph_builder)))
                {
                    MessageBox(NULL, "Unable to create DirectShow Graph Builder object.", "Error", MB_OK);
                    
            return FALSE;
                }

            一旦創建對象IGraphBuilder成功,就可以請求另兩個接口了:
             
            // Query for the media control and event objects
            g_graph_builder->QueryInterface(IID_IMediaControl, (void**)&g_media_control);
            g_graph_builder->QueryInterface(IID_IMediaEvent, (
            void**)&g_media_event);
             

            加載媒體文件
             
            實際上, DirectShow并不加載媒體文件,而是創建一個DirectShow濾波器到文件的連接。數據在解碼的時候被流化,這樣可以減少在播放過程中的內存使用,創建連接的過程叫做渲染(rendering)。渲染一個文件,需要調用IGraphBuilder::RenderFile函數。

            Builds a filter graph that renders the specified file.

            Syntax

            HRESULT RenderFile(
            LPCWSTR lpwstrFile,
            LPCWSTR lpwstrPlayList
            );

            Parameters

            lpwstrFile
            [in] Pointer to the name of the file containing the data to be rendered.
            lpwstrPlayList
            [in] Pointer to the playlist name. Reserved; must be NULL. (This parameter is currently unimplemented.)

            Return Value

            Returns an HRESULT value, which can include one of the following:

            • VFW_S_AUDIO_NOT_RENDERED
            • VFW_S_DUPLICATE_NAME
            • VFW_S_PARTIAL_RENDER
            • VFW_S_RPZA
            • VFW_S_VIDEO_NOT_RENDERED

            Remarks

            If the lpwstrPlayList parameter is NULL, this method would use the default playlist, which typically renders the entire file.

             

            控制音樂的播放

            在媒體文件被渲染之后,就可以使用另外兩個接口 IMediaControl和IMediaEvent進行播放或者對播放進行控制了。

            第一個接口 IMediaControl用于播放和各種播放相關的操作,這個接口有三個函數:IMediaControl::Run,IMediaControl:: Pause,IMediaControl::Stop。

            The IMediaControl interface provides methods for controlling the flow of data through the filter graph. It includes methods for running, pausing, and stopping the graph. The Filter Graph Manager implements this interface. For more information on filter graph states, see Data Flow in the Filter Graph.

            IMediaControl also provides Automation-compatible methods for building graphs. Applications written in Microsoft® Visual Basic® can use these methods to construct filter graphs or retrieve information about the graph. Applications written in C or C++ should use the methods in IGraphBuilder and IFilterGraph2 instead, because they are more efficient.

            In addition to the methods inherited from IDispatch, the IMediaControl interface exposes the following methods.

            Method Description
            Run Runs all the filters in the filter graph.
            Pause Pauses all filters in the filter graph.
            Stop Stops all the filters in the filter graph.
            StopWhenReady Pauses the filter graph, allowing filters to queue data, and then stops the filter graph.
            GetState Retrieves the state of the filter graph.
            RenderFile Builds a filter graph that renders the specified file. (For Visual Basic.)
            AddSourceFilter Adds a source filter to the filter graph, for a specified file. (For Visual Basic.)
            get_FilterCollection Retrieves a collection of the filters in the filter graph. (For Visual Basic.)
            get_RegFilterCollection Retrieves a collection of all the filters listed in the registry. (For Visual Basic.)

             

            如果要開始播放一段音樂,調用 IMediaControl::Run就可以了。

            Switches the entire filter graph into a running state.

            Syntax

            HRESULT Run(void); 

            Return Value

            Returns S_OK if the graph is actually running.

            Returns S_FALSE if the graph is preparing to run (the graph will run automatically when it's ready). Call GetState to wait for the transition to the running state to complete or to check if the transition has completed. If the method returns S_FALSE, subsequent calls to GetState will return a value of State_Running when the graph is actually running. If the transition to the running state is not complete GetState can return a return code of VFW_S_STATE_INTERMEDIATE.

            Returns an HRESULT error code if the graph could not run and is now stopped.

            Remarks

            In a running state, data is pushed down the filter graph and rendered. The graph remains in a running state until it is stopped by the IMediaControl::Pause or IMediaControl::Stop method. The graph remains in a running state even after notifying the application of completion (that is, the EC_COMPLETE notification is sent to the application). This allows the application to determine whether to pause or stop after completion.

            If the filter graph is in the stopped state, this method first pauses the graph before running.

            If an error value is returned, some filters within the graph might have successfully entered the running state. In a multistream graph, entire streams might be playing successfully. The application must determine whether to stop running or not.

            一旦播放開始,就可以隨時暫停播放或者停止播放,如果希望暫停播放,調用IMediaControl::Pause函數。

            Pauses all the filters in the filter graph.

            Syntax

            HRESULT Pause(void);
            

            Return Value

            Returns S_OK if the graph is actually paused.

            Returns S_FALSE if the graph is in paused state but some filters have not completed the transition to pause. Call GetState to wait for the transition to the paused state to complete or to check if the transition has completed. If the method returns S_FALSE, subsequent calls to GetState will return a value of State_Paused when the graph is paused. If the transition to paused is not complete GetState can return a return code of VFW_S_STATE_INTERMEDIATE.

            Returns an HRESULT error code if the graph could not transition to paused state and is now stopped.

            Remarks

            In the paused state, filters process data but do not render it. Data is pushed down the filter graph and is processed by transform filters as far as buffering permits. No data is rendered (except that media types capable of being rendered statically, such as video, have a static, poster frame rendered in paused mode). Therefore, putting a filter graph into a paused state cues the graph for immediate rendering when put into a running state.

            開始播放之后,可以隨時調用IMediaContrl::Stop函數來停止播放。

            Switches all filters in the filter graph to a stopped state.

            Syntax

            HRESULT Stop(void); 

            Return Value

            Returns an HRESULT value.

            Remarks

            In this mode, filters release resources and no data is processed. If the filters are in a running state, this method pauses them before stopping them. This allows video renderers to make a copy of the current frame for poster frame display while stopped.

            以下代碼演示了如何播放MP3文件。
             
            //--------------------------------------------------------------------------------
            // Play mp3 which specified by filename.
            //--------------------------------------------------------------------------------
            BOOL Play_MP3(char* filename)
            {
                
            // convert filename to wide-character string
                WCHAR w_filename[MAX_PATH] = {0};

                mbstowcs(w_filename, filename, MAX_PATH);

                
            // render the file
                g_graph_builder->RenderFile(w_filename, NULL);

                
            // play the file, switches the entire filter graph into a running state.
                g_media_control->Run();

                
            return TRUE;
            }
             


            檢測播放事件

            我們主要感興趣的IMediaEvent函數大概有三個:GetEvent,FreeEventParams,WaitForCompletion。

            The IMediaEvent interface contains methods for retrieving event notifications and for overriding the Filter Graph Manager's default handling of events. The IMediaEventEx interface inherits this interface and extends it.

            The Filter Graph Manager implements this interface. Applications can use it to respond to events that occur in the filter graph, such as the end of a stream or a rendering error. Filters post events to the filter graph using the IMediaEventSink interface.

            For more information about event notification, see Event Notification in DirectShow. For a list of system-defined event notifications, see Event Notification Codes.

            In addition to the methods inherited from IDispatch, the IMediaEvent interface exposes the following methods.

            Method Description
            CancelDefaultHandling Cancels the Filter Graph Manager's default handling for a specified event.
            FreeEventParams Frees resources associated with the parameters of an event.
            GetEvent Retrieves the next event notification from the event queue.
            GetEventHandle Retrieves a handle to a manual-reset event that remains signaled while the queue contains event notifications.
            RestoreDefaultHandling Restores the Filter Graph Manager's default handling for a specified event.
            WaitForCompletion Waits for the filter graph to render all available data.


            第一個函數GetEvent可能是使用最多的函數,它用于找回通知播放狀態的事件。

            Retrieves the next notification event.

            Syntax

            HRESULT GetEvent(
            long *lEventCode,
            long *lParam1,
            long *lParam2,
            long msTimeout
            );

            Parameters

            IEventCode
            [out] Pointer to the next event notification.
            lParam1
            [out] Pointer to the first parameter of the event.
            lParam2
            [out] Pointer to the second parameter of the event.
            msTimeout
            [in] Time, in milliseconds, to wait before assuming that there are no events.

            Return Value

            Returns an HRESULT value that depends on the implementation of the interface. If the time-out is zero and no event is waiting, or if the time-out elapses before an event appears, this method returns E_ABORT.

            Remarks

            The application can pass a time-out value of INFINITE to indicate that the method should block until there is an event; however, applications should avoid using INFINITE. Threads cannot process any messages while waiting in GetEvent. If you call GetEvent from the thread that processes Windows messages, specify only small wait times on the call in order to remain responsive to user input. This is most important when streaming data from a source such as the Internet, because state transitions can take significantly more time to complete.

            After calling GetEvent, applications should always call FreeEventParams to release any resource associated with the event.

            For a list of notification codes and event parameter values, see Event Notification Codes.

            一般我們最希望獲取到的事件是播放完成,這個事件的值是EC_COMPLETE。如果調用GetEvent函數之后,lEventCode的值是 EC_COMPLETE,說明播放完成了。

            當獲取并處理了GetEvent產生的事件后,必須把事件所占用的資源釋放,釋放資源使用IMediaEvent::FreeEventParams函數。

            Frees resources associated with the parameters of an event.

            Syntax

            HRESULT FreeEventParams(
            long lEventCode,
            long lParam1,
            long lParam2
            );

            Parameters

            lEventCode
            [in] Next event notification.
            lParam1
            [in] First parameter of the event.
            lParam2
            [in] Second parameter of the event.

            Return Value

            Returns an HRESULT value.

            Remarks

            Event parameters can be of type LONG or BSTR. If a BSTR is passed as an event, it will have been allocated by the task allocator and should be freed using this method. No reference-counted interfaces are passed to an application using IMediaEvent::GetEvent, because these cannot be overridden by IMediaEvent::CancelDefaultHandling. Therefore, do not use this method to release interfaces.

            以下代碼演示了如何捕捉事件并釋放事件所占用的資源:
             
                    // get th status of the song, it if is done, exit program.

                    
            long event_code, param1, param2;

                    
            // retrieves the next notification event
                    if(SUCCEEDED(g_media_event->GetEvent(&event_code, &param1, &param2, 1)))
                    {
                        
            if(event_code == EC_COMPLETE)
                        {
                            
            // frees resources associated with the parameters of an events.
                            g_media_event->FreeEventParams(event_code, param1, param2);

                            
            break;
                        }                
                    }

            在需要逐幀連續監視事件的時候,用GetEvent和FreeEventParams組合是很有用的,它能幫助我們獲取事件并作恰當的處理。但當我們需要連續播放而不希望連續監視播放過程的時候,另外一個函數就會很有用,即WaitForCompletion函數。它可以一直播放,在播放完成的時候,會把控制權交給我們。

            Blocks execution of the application thread until the graph's operation finishes.

            Syntax

            HRESULT WaitForCompletion(
            long msTimeout,
            long *pEvCode
            );

            Parameters

            msTimeout
            [in] Duration of the time-out, in milliseconds. Pass zero to return immediately. To block indefinitely, pass INFINITE.
            pEvCode
            [out] Pointer to the event that terminated the wait. This value can be one of the following:
            EC_COMPLETE Operation completed.
            EC_ERRORABORT Error. Playback can't continue.
            EC_USERABORT User terminated the operation.
            Zero Operation has not completed.

            Return Value

            Returns one of the following HRESULT values.

            E_ABORT Function timed out before the operation completed. This is equivalent to a zero pEvCode value.
            S_OK Operation completed.
             

            Remarks

            This method is the equivalent of blocking until the event notification EC_COMPLETE, EC_ERRORABORT, or EC_USERABORT is received, or the time-out occurs.

            When this method returns, the filter graph is still running. This method assumes that separate calls to the IMediaEvent interface are not being made. The method fails if the graph is not in, or transitioning into, a running state.

            The time-out parameter (msTimeout) specifies the length of time to wait for completion. To test whether the operation completed, specify a zero msTimeout value and check the event code value (pEvCode) for zero, indicating that the operation has not completed.

             

            釋放DirectShow資源

            一旦播放完成,就要關閉和釋放所有占用的DirectShow資源。
             
                // stop music and relaese DirectShow objects

                // switches all filters in the filter graph to a stopped state.
                g_media_control->Stop();

                g_media_event->Release();
                g_media_event = NULL;

                g_media_control->Release();
                g_media_control = NULL;

                g_graph_builder->Release();
                g_graph_builder = NULL;

            下面給出完整的代碼示例,由于DirectX9已經將DirectShow移除,所以需要安裝DirectX8 SDK,并在Vistual Studio中設置頭文件目錄。

            點擊下載源碼和工程

             
            /***************************************************************************************
            PURPOSE:
                MP3 Playing Demo
             ***************************************************************************************/


            #include <windows.h>
            #include <stdio.h>
            #include <dshow.h>
            #include "resource.h"

            #pragma comment(lib, "dxguid.lib")
            #pragma comment(lib, "strmiids.lib")

            #pragma warning(disable : 4996)

            #define Safe_Release(p) if((p)) (p)->Release();

            // window handles, class.
            HWND g_hwnd;
            char g_class_name[] = "MP3PlayClass";

            // DirectShows components
            IGraphBuilder*  g_graph_builder = NULL;
            IMediaControl*  g_media_control = NULL;
            IMediaEvent*    g_media_event   = NULL;

            //--------------------------------------------------------------------------------
            // Play mp3 which specified by filename.
            //--------------------------------------------------------------------------------
            BOOL Play_MP3(char* filename)
            {
                
            // convert filename to wide-character string
                WCHAR w_filename[MAX_PATH] = {0};

                mbstowcs(w_filename, filename, MAX_PATH);

                
            // render the file
                g_graph_builder->RenderFile(w_filename, NULL);

                
            // play the file, switches the entire filter graph into a running state.
                g_media_control->Run();

                
            return TRUE;
            }

            //--------------------------------------------------------------------------------
            // Window procedure.
            //--------------------------------------------------------------------------------
            long WINAPI Window_Proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
            {
                
            switch(msg)
                {
                
            case WM_DESTROY:
                    PostQuitMessage(0);
                    
            return 0;
                }

                
            return (long) DefWindowProc(hwnd, msg, wParam, lParam);
            }

            //--------------------------------------------------------------------------------
            // Main function, routine entry.
            //--------------------------------------------------------------------------------
            int WINAPI WinMain(HINSTANCE inst, HINSTANCE, LPSTR cmd_line, int cmd_show)
            {
                WNDCLASS            win_class;
                MSG                 msg;    

                
            // create window class and register it
                win_class.style         = CS_HREDRAW | CS_VREDRAW;
                win_class.lpfnWndProc   = Window_Proc;
                win_class.cbClsExtra    = 0;
                win_class.cbWndExtra    = DLGWINDOWEXTRA;
                win_class.hInstance     = inst;
                win_class.hIcon         = LoadIcon(inst, IDI_APPLICATION);
                win_class.hCursor       = LoadCursor(NULL, IDC_ARROW);
                win_class.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1);
                win_class.lpszMenuName  = NULL;
                win_class.lpszClassName = g_class_name;    

                
            if(! RegisterClass(&win_class))
                    
            return FALSE;

                
            // create the main window
                g_hwnd = CreateDialog(inst, MAKEINTRESOURCE(IDD_MP3PLAY), 0, NULL);

                ShowWindow(g_hwnd, cmd_show);
                UpdateWindow(g_hwnd);

                
            // initialize COM
                //
                // initialize the COM library on the current thread and identifies the concurrency model as single-thread
                // apartment (STA).
                CoInitialize(0);

                
            // create the DirectMusic performance object
                //
                // creates a single uninitialized object of the class associated with a specified CLSID.
                if(FAILED(CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, 
                                           (
            void**)&g_graph_builder)))
                {
                    MessageBox(NULL, "Unable to create DirectShow Graph Builder object.", "Error", MB_OK);
                    
            return FALSE;
                }

                
            // Query for the media control and event objects
                g_graph_builder->QueryInterface(IID_IMediaControl, (void**)&g_media_control);
                g_graph_builder->QueryInterface(IID_IMediaEvent, (
            void**)&g_media_event);
                
                
            // play mp3
                Play_MP3("escape.mp3");
                
                
            // start message pump, waiting for signal to quit.
                ZeroMemory(&msg, sizeof(MSG));

                
            while(msg.message != WM_QUIT)
                {
                    
            if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
                    {
                        TranslateMessage(&msg);
                        DispatchMessage(&msg);            
                    }             

                    
            // get th status of the song, it if is done, exit program.

                    
            long event_code, param1, param2;

                    
            // retrieves the next notification event
                    if(SUCCEEDED(g_media_event->GetEvent(&event_code, &param1, &param2, 1)))
                    {
                        
            if(event_code == EC_COMPLETE)
                        {
                            
            // frees resources associated with the parameters of an events.
                            g_media_event->FreeEventParams(event_code, param1, param2);

                            
            break;
                        }                
                    }

                    
            // frees resources associated with the parameters of an events.
                    g_media_event->FreeEventParams(event_code, param1, param2);
                }

                
            // stop music and relaese DirectShow objects

                // switches all filters in the filter graph to a stopped state.
                g_media_control->Stop();

                g_media_event->Release();
                g_media_event = NULL;

                g_media_control->Release();
                g_media_control = NULL;

                g_graph_builder->Release();
                g_graph_builder = NULL;

                UnregisterClass(g_class_name, inst);

                
            // release COM system
                //
                // Closes the COM library on the current thread, unloads all DLLs loaded by the thread, frees any other
                // resources that the thread maintains, and forces all RPC connections on the thread to close.
                CoUninitialize();
                
                
            return (int) msg.wParam;
            }
             

            運行截圖:



            posted on 2007-08-04 18:18 lovedday 閱讀(8108) 評論(20)  編輯 收藏 引用

            評論

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2007-08-13 22:32 artcpp

            非常感謝您的一系列文件,對我自學編程(尤其是Direct方面)起到了很大的引導作用!!謝謝您!  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2007-08-13 22:33 artcpp

            不知能否QQ聯系:請教一個DirectShow播放MP3,在個別機器上失敗的奇怪問題。我的QQ:1090833,盼,多謝!!  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2007-08-13 22:52 lovedday

            @artcpp
            不用客氣,用“你”就好了,用“您”我擔當不起,很高興我的文章能幫到你,這也是我繼續寫技術文章的動力,提高自己的同時還能幫到別人。其實我的水平也很菜的,如果可以幫到你,一定盡力。^_^  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2007-10-04 18:09 bluesea

            不知道為什么到 directX 9.0 里,要把 DirectShow 去掉了呢?  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2007-10-07 13:29 lovedday

            據說是轉移到win32 sdk去了,可能是DirectShow功能越來越通用,越來越重要的原因。  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7)[未登錄] 2008-01-02 15:42 max

            您好~~ 很感謝你的文章, 對我幫助很大, 不過, 我有個問題, 關於只播音訊時, 為什麼不論我用你的方式, 或msdn上的教學, 我的directshow (on mobile 6) 都只能播放出wav檔, 可以給我解感一下嗎?? 需要另外加filter或什麼類的嗎, 不是graphfilter就自動建立基本的filter嗎, 我弄好久了, 我需要能播放midi, mp3, wma.....  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2008-04-06 13:46 wind

            很感謝你這一系列啊,我正在做基于DIRECTX的MP3播放系統設計的畢業設計,還有沒有這方面比較好用的資料啊,最好注釋比較淺顯詳盡的,感激不盡啊~~~我的郵箱是coolwind2006@126.com  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2008-04-06 14:03 lovedday

            沒了,去買書看看吧,這些東西我也是書上看到的。  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2008-04-21 18:21 淼焱

            我有一些問題想請教一下 我的QQ 282338785 謝謝!!  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2008-04-21 18:26 lovedday

            隔了這么久了,DirectShow的一些知識我可能都忘了,這樣吧,你給我寫信,我的email是lovedday@gmail.com,看我能不能幫上忙,別說什么請教,我也沒什么經驗的。  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2008-08-18 04:54 lyra

            你的東西太好了 謝謝  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2008-10-17 22:12 來來往往

            你的資料太好了,謝謝共享  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2008-11-10 01:04 wlxfm

            怎樣做一個模擬鍵盤的軟件,用VC++?基于DirectX,就象iDreamPiano一樣。  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2009-05-06 20:05 李平

            真的很感謝兄弟啊,這么珍貴的資料,看來自學DirectSound有希望了!!!萬分感激啊!!!  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2009-05-19 00:46 果蠅

            太感謝了  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7)[未登錄] 2009-05-19 13:49 李帥

            怎么讓這個音樂循環播放?  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2009-09-01 04:54 lyra

            非常感謝,看你的資料有兩年了,謝謝您。祝您家庭幸福,身體健康,事業成功。  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2010-01-17 10:09 yinian

            非常感謝您這么詳細的介紹,實際上也是一個非常好的教程了。我現在有個疑惑的是,微軟為什么要在DirectX9里面把DirectShow刪除呢,是不是DShow本身存在技術方面的原因,另外,既然新的DirectX中已經沒有DShow了,是不是意味著windows以后的版本對DShow的支持也不會更新了,那么現在使用DShow是不是會以后會碰到一些難以解決的問題呢?  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2013-03-15 17:40

            謝謝你的文章,我還有一些具體的問題想問一下,希望能加一下qq:1054359972  回復  更多評論   

            # re: 用DirectX Audio和DirectShow播放聲音和音樂(7) 2014-09-27 17:52 CMZ

            其實我想問下。通過這些demo可以播放音樂。但是怎么實現循環播放呢?  回復  更多評論   

            公告

            導航

            統計

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關鏈接

            搜索

            最新評論

            思思久久好好热精品国产| a级毛片无码兔费真人久久| 久久国产乱子伦精品免费午夜| 精品无码人妻久久久久久| 亚洲国产精品无码久久| 中文字幕亚洲综合久久2| 中文字幕乱码久久午夜| 国产免费久久精品丫丫| 久久精品国产AV一区二区三区| 久久精品国产免费一区| 色综合久久无码中文字幕| 国产ww久久久久久久久久| 亚洲精品国产美女久久久| 精品久久久久久国产牛牛app| 亚洲午夜久久久影院| 久久er国产精品免费观看8| 久久久久久夜精品精品免费啦 | 国产毛片欧美毛片久久久| 日韩精品久久久久久| 国产成人无码精品久久久久免费| 婷婷久久综合九色综合九七| 四虎国产精品免费久久| 观看 国产综合久久久久鬼色 欧美 亚洲 一区二区 | 欧美亚洲国产精品久久久久| 99久久99久久精品国产片| 久久综合88熟人妻| 97久久精品国产精品青草| 国内精品久久久人妻中文字幕| 成人综合伊人五月婷久久| 人人狠狠综合久久88成人| 久久久久久精品无码人妻| 精品熟女少妇AV免费久久| 久久亚洲中文字幕精品一区| 久久人妻少妇嫩草AV无码专区| 久久久SS麻豆欧美国产日韩| 无码任你躁久久久久久老妇App| 国产福利电影一区二区三区久久久久成人精品综合 | 一本大道加勒比久久综合| 久久久久久免费一区二区三区| 久久精品www| 久久免费香蕉视频|