Visual Basic, .NET, ASP, VBScript
 

   
   
     

Форум - Общий форум

Страница: 1 | 2 |

 

  Вопрос: Люди есть у кого DirectX 7 или 8 SDK Добавлено: 24.09.07 12:37  

Автор вопроса:  KreAtoR

Ответить

  Ответы Всего ответов: 20  

Номер ответа: 16
Автор ответа:
 KreAtoR



Вопросов: 120
Ответов: 438
 Профиль | | #16 Добавлено: 28.09.07 13:29
вот мой примерчик

http://vbnet.ru/forum/show.aspx?id=153088

Ответить

Номер ответа: 17
Автор ответа:
 vito



Разработчик Offline Client

Вопросов: 23
Ответов: 879
 Web-сайт: softvito.narod2.ru
 Профиль | | #17
Добавлено: 28.09.07 22:34
KreAtoR

Я не особо разбирался в примерах для 6 -ки.
Для С++ подобный пример есть (я про него говорил) - FullDuplex.
Насколько я понимаю SDK, если это возможно все примеры с С++, дублируются на vb6. Этот пример не продублирован не в 8 не 9.
Очевидно на это есть причины (либо невозможность, либо большая сложность реализации).

Разбираться в С - ном примере у меня просто времени нет. Но бегло просмотрев, могу сказать - ни каких ресурсрсов.
Запись - в буфер, оттуда же и воспроизведение.

Ответить

Номер ответа: 18
Автор ответа:
 KreAtoR



Вопросов: 120
Ответов: 438
 Профиль | | #18 Добавлено: 28.09.07 22:55
проблеиа в том что мне надо сд6елать воспроизведение в реальном времени. я могу CaptureBuffer сохранить в файл, его открыть в SoundBuffer и воспроизвести.
Но надо просто скопировать буферы и воспроизвести. проблема в том, что в 8 directX требует от меня dll а что за dll я понятия не мию и не объясняется. Думал найду в SDK но имею только примеры, а в этих примерах этот dll не появляется

Ответить

Номер ответа: 19
Автор ответа:
 vito



Разработчик Offline Client

Вопросов: 23
Ответов: 879
 Web-сайт: softvito.narod2.ru
 Профиль | | #19
Добавлено: 28.09.07 23:04
Ладно взглянул я.
Для того что ты хочешь, нухно создавать звуковой объект с поддержкой полного дуплекса. На 6 - ке это можно. Вот только примеров нет.

Смотри документацию - по ключевым слова Full Duplex, и по API которые я привел.


DirectX8.DirectSoundCaptureCreate

Creates a DirectSoundCapture8 object.

object.DirectSoundCaptureCreate( _
    guid As String _
) As DirectSoundCapture8

Parts
object
Object expression that resolves to a DirectX8 object.
guid
A GUID string that identifies the sound capture device. The value of this parameter must be one of the GUIDs returned by DirectX8.getDSCaptureEnum, vbNullString for the default device, or one of the following values:
DSDEVID_DEFAULTCAPTURE
System-wide default audio capture device.
DSDEVID_DEFAULTVOICECAPTURE
Default voice capture device.
Return Values
Returns a DirectSoundCapture8 object.

Error Codes
If the method fails, an error is raised and Err.Number may be set to one of the following Microsoft® DirectSound® error codes:

DSERR_INVALIDPARAM
DSERR_NOAGGREGATION
DSERR_OUTOFMEMORY
Remarks
This method could fail on some sound cards that do not support full duplex. Calling DirectX8.DirectSoundCreate may set the capture device to an unsupported capture frequency, which will cause DirectX8.DirectSoundCaptureCreate to fail.


The DirectSound8 object is released as soon as it has been created. On systems that do not support full duplex, the creation of DirectSoundCapture8 could fail if the DirectSound8 object exists.


You create the DirectSoundCapture8 object by calling the DirectX8.DirectSoundCaptureCreate method.

The guid parameter to DirectSoundCaptureCreate can be a GUID obtained by enumeration, or it can be one of the following values:

DSDEVID_DefaultCapture
The default system capture device. You can also specify this device by passing vbNullString in the device GUID parameter.
DSDEVID_DefaultVoiceCapture
The default voice communications capture device. Typically, this is a secondary device such as a USB headset with microphone.
If no device driver is present, the call raises an error.

If you want DirectSound8 and DirectSoundCapture8 objects to coexist, then you should create the DirectSound8 object before creating the DirectSoundCapture8 object.

Some audio devices aren't configured for full duplex audio by default. If your application has problems creating both a DirectSound8 object and a DirectSoundCapture8 object, you should advise the user to check the audio device properties to ensure that full duplex is enabled.


DirectPlayVoiceTest8.CheckAudioSetup
Runs the Audio Setup Wizard on the specified devices. This wizard runs a series of tests on the devices to determine if they are capable of full duplex audio and to ensure that the microphone is plugged in and working correctly on the capture device.

CheckAudioSetup( _
    guidPlaybackDevice As String, _
    guidCaptureDevice As String, _
    hwndOwner As Long, _
    lFlags As Long) As Long
Parts
guidPlaybackDevice
GUID that identifies the playback device to test. If an empty string is passed for this parameter, Microsoft® DirectPlay® Voice tests the default voice playback device defined by Microsoft® DirectSound®.
guidCaptureDevice
GUID that identifies the capture device to test. If an empty string is passed for this parameter, DirectPlay Voice tests the default voice capture device defined by DirectSound.
hwndOwner
The test wizard invoked by this method is modal. If the calling application has a window that should be the parent window of the wizard, it should pass a handle to that window in this parameter. If the calling application does not have a window, it can pass 0. If the DVFLAGS_QUERYONLY flag is specified, this parameter is not used and the application can pass 0.
lFlags
Flags. The following flags can be set.
DVFLAGS_QUERYONLY
Audio setup is not run. Instead, the method checks the registry to see if the devices have been tested. If the devices have not been tested, the method returns DVERR_RUNSETUP. If the devices have been tested, the method returns DV_FULLDUPLEX if the devices support full duplex audio, or DV_HALFDUPLEX if the devices do not support full duplex audio.
DVFLAGS_ALLOWBACK
Enable the Back button on the Welcome page of the wizard. If the user clicks the Back button on the Welcome page, the wizard exits, and CheckAudioSetup returns DVERR_USERBACK.
Error Codes


Audio Device Testing
Microphone setup is supported by the DirectPlayVoiceTest8.CheckAudioSetup method.

Calling this method invokes the DirectX audio setup wizard, which runs tests and confirms that the system properly supports full duplex operation and ensures microphone and playback settings are correct. You need to run the wizard only once for each combination of playback and capture device you select. Each time your application starts, you should test the configuration by calling DirectPlayVoiceTest8.CheckAudioSetup with the lFlags parameter set to DVFLAGS_QUERYONLY. This enables you to quickly test whether the device configuration has changed since your devices were last tested. If your devices have not been tested, you should run DirectPlayVoiceTest8.CheckAudioSetup again to invoke the wizard. If the configuration has changed since the last test and you have not run the wizard again, DirectPlayVoiceClient8.Connect will return DVERR_RUNSETUP, and you will not be able to initialize DirectPlay Voice.

If the user's sound card does not have full duplex capability, it can only listen to voice communications. It cannot send voice communications because the game typically holds the audio card in playback mode. To prevent problems, DirectX 8.0 does not enable switching dynamically between playback and capturing. The DirectX audio setup wizard provides feedback to the user on the duplexing capabilities of the system.

Note that there are still many computer systems in active use that do not include a full duplex sound card. Full duplex sound cards came into popular use in 1998, although at the time few of the audio card drivers had full duplex operation enabled. Customers who purchased new systems in 1999 or upgraded drivers in 1999 are more likely to have full duplex capability.


То есть устройство должно быть сконфигурировано для дуплексной работы (и поддерживать дуплекс).

Ответить

Номер ответа: 20
Автор ответа:
 KreAtoR



Вопросов: 120
Ответов: 438
 Профиль | | #20 Добавлено: 02.10.07 12:24
хм надо проверить, потдерживает или нет. но все равно спасибо, за разхяснения

Ответить

Страница: 1 | 2 |

Поиск по форуму



© Copyright 2002-2011 VBNet.RU | Пишите нам