버전

menu_open
Wwise SDK 2024.1.0
IAkStreamMgr.h
이 파일의 문서화 페이지로 가기
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Copyright (c) 2024 Audiokinetic Inc.
25 *******************************************************************************/
26 
27 /// \file
28 /// Defines the API of Audiokinetic's I/O streaming solution.
29 
30 #ifndef _IAK_STREAM_MGR_H_
31 #define _IAK_STREAM_MGR_H_
32 
35 
36 //-----------------------------------------------------------------------------
37 // Defines.
38 //-----------------------------------------------------------------------------
39 
40 /// \name Profiling string lengths.
41 //@{
42 #define AK_MONITOR_STREAMNAME_MAXLENGTH (64)
43 #define AK_MONITOR_DEVICENAME_MAXLENGTH (16)
44 //@}
45 
46 //-----------------------------------------------------------------------------
47 // Enums.
48 //-----------------------------------------------------------------------------
49 
50 /// Stream status.
52 {
53  AK_StmStatusIdle = 0, ///< The stream is idle
54  AK_StmStatusCompleted = 1, ///< Operation completed / Automatic stream reached end
55  AK_StmStatusPending = 2, ///< Operation pending / The stream is waiting for I/O
56  AK_StmStatusCancelled = 3, ///< Operation cancelled
57  AK_StmStatusError = 4 ///< The low-level I/O reported an error
58 };
59 
60 /// Move method for position change.
61 /// \sa
62 /// - AK::IAkStdStream::SetPosition()
63 /// - AK::IAkAutoStream::SetPosition()
65 {
66  AK_MoveBegin = 0, ///< Move offset from the start of the stream
67  AK_MoveCurrent = 1, ///< Move offset from the current stream position
68  AK_MoveEnd = 2 ///< Move offset from the end of the stream
69 };
70 
71 /// File open mode.
73 {
74  AK_OpenModeRead = 0, ///< Read-only access
75  AK_OpenModeWrite = 1, ///< Write-only access (opens the file if it already exists)
76  AK_OpenModeWriteOvrwr = 2, ///< Write-only access (deletes the file if it already exists)
77  AK_OpenModeReadWrite = 3 ///< Read and write access
78 };
79 
80 /// Stream information.
81 /// \sa
82 /// - AK::IAkStdStream::GetInfo()
83 /// - AK::IAkAutoStream::GetInfo()
85 {
86  AkDeviceID deviceID; ///< Device ID
87  const AkOSChar * pszName; ///< User-defined stream name (specified through AK::IAkStdStream::SetStreamName() or AK::IAkAutoStream::SetStreamName())
88  AkUInt64 uSize; ///< Total stream/file size in bytes
89  bool bIsOpen; ///< True when the file is open (implementations may defer file opening)
90  bool bIsLanguageSpecific;///< True when the file was found in a language specific location
91 };
92 
93 /// Automatic streams heuristics.
95 {
96  AkReal32 fThroughput; ///< Average throughput in bytes/ms
97  AkUInt64 uLoopStart; ///< Set to the start of loop (byte offset from the beginning of the stream) for streams that loop, 0 otherwise
98  AkUInt64 uLoopEnd; ///< Set to the end of loop (byte offset from the beginning of the stream) for streams that loop, 0 otherwise
99  AkUInt8 uMinNumBuffers; ///< Minimum number of buffers if you plan to own more than one buffer at a time, 0 or 1 otherwise
100  ///< \remarks You should always release buffers as fast as possible, therefore this heuristic should be used only when
101  ///< dealing with special contraints, like drivers or hardware that require more than one buffer at a time.\n
102  ///< Also, this is only a heuristic: it does not guarantee that data will be ready when calling AK::IAkAutoStream::GetBuffer().
103  AkPriority priority; ///< The stream priority. it should be between AK_MIN_PRIORITY and AK_MAX_PRIORITY (included).
104 };
105 
106 /// Automatic streams buffer settings/constraints.
108 {
109  AkUInt32 uBufferSize; ///< Hard user constraint: When non-zero, forces the I/O buffer to be of size uBufferSize
110  ///< (overriding the device's granularity).
111  ///< Otherwise, the size is determined by the device's granularity.
112  AkUInt32 uMinBufferSize; ///< Soft user constraint: When non-zero, specifies a minimum buffer size
113  ///< \remarks Ignored if uBufferSize is specified.
114  AkUInt32 uBlockSize; ///< Hard user constraint: When non-zero, buffer size will be a multiple of that number, and returned addresses will always be aligned on multiples of this value.
115 };
116 
117 /// \name Profiling structures.
118 //@{
119 
120 #pragma pack(push, 4)
121 
122 /// Device descriptor.
124 {
125  AkDeviceID deviceID; ///< Device ID
126  bool bCanWrite; ///< Specifies whether or not the device is writable
127  bool bCanRead; ///< Specifies whether or not the device is readable
129  AkUInt32 uStringSize; ///< Device name string's size (number of characters)
130 };
131 
132 /// Device descriptor.
134 {
135  AkDeviceID deviceID; ///< Device ID
136  AkUInt32 uMemSize; ///< IO memory pool size
137  AkUInt32 uMemUsed; ///< IO memory pool used
138  AkUInt32 uAllocs; ///< Cumulative number of allocations
139  AkUInt32 uFrees; ///< Cumulative number of deallocations
140  AkUInt32 uPeakRefdMemUsed; ///< Memory peak since monitoring started
141  AkUInt32 uUnreferencedCachedBytes; ///< IO memory that is cached but is not currently used for active streams.
142  AkUInt32 uGranularity; ///< IO memory pool block size
143  AkUInt32 uNumActiveStreams; ///< Number of streams that have been active in the previous frame
144  AkUInt32 uTotalBytesTransferred; ///< Number of bytes transferred, including cached transfers
145  AkUInt32 uLowLevelBytesTransferred; ///< Number of bytes transferred exclusively via low-level
146  AkReal32 fAvgCacheEfficiency; ///< Total bytes from cache as a percentage of total bytes.
147  AkUInt32 uNumLowLevelRequestsCompleted; ///< Number of low-level transfers that have completed in the previous monitoring frame
148  AkUInt32 uNumLowLevelRequestsCancelled; ///< Number of low-level transfers that were cancelled in the previous monitoring frame
149  AkUInt32 uNumLowLevelRequestsPending; ///< Number of low-level transfers that are currently pending
150  AkUInt32 uCustomParam; ///< Custom number queried from low-level IO.
151  AkUInt32 uCachePinnedBytes; ///< Number of bytes that can be pinned into cache.
152 };
153 
154 /// Stream general information.
156 {
157  AkUInt32 uStreamID; ///< Unique stream identifier
158  AkDeviceID deviceID; ///< Device ID
161  AkUInt32 uStringSize; ///< Stream name string's size (number of characters)
162  AkUInt64 uFileSize; ///< File size
163  bool bIsAutoStream; ///< True for auto streams
164  bool bIsCachingStream; ///< True for caching streams
165 };
166 
167 /// Stream statistics.
169 {
170  AkUInt32 uStreamID; ///< Unique stream identifier
171  // Status (replace)
172  AkUInt32 uPriority; ///< Stream priority
173  AkUInt64 uFilePosition; ///< Current position
174  AkUInt32 uTargetBufferingSize; ///< Total stream buffer size (specific to IAkAutoStream)
175  AkUInt32 uVirtualBufferingSize; ///< Size of available data including requested data (specific to IAkAutoStream)
176  AkUInt32 uBufferedSize; ///< Size of available data (specific to IAkAutoStream)
177  AkUInt32 uNumBytesTransfered; ///< Transfered amount since last query (Accumulate/Reset)
178  AkUInt32 uNumBytesTransferedLowLevel;///< Transfered amount (from low-level IO only) since last query (Accumulate/Reset)
179  AkUInt32 uMemoryReferenced; ///< Amount of streaming memory referenced by this stream
180  AkReal32 fEstimatedThroughput; ///< Estimated throughput heuristic
181  bool bActive; ///< True if this stream has been active (that is, was ready for I/O or had at least one pending I/O transfer, uncached or not) in the previous frame
182 };
183 
184 
185 /// Contains parameters for the IAkFileLocationResolver::Open() call and related functions.
186 /// Files can be designated with a file name or a file ID. Only one of the two members should be valid.
187 /// \note pszFileName is stored on the stack and will be valid only through the function call.
189 {
191  : pszFileName(NULL)
193  , pFlags(NULL)
195 
196  AkFileOpenData(const AkOSChar* in_pszFileName, AkOpenMode in_eOpenMode = AK_OpenModeRead, AkFileSystemFlags* in_pFlags = NULL)
197  : pszFileName(in_pszFileName)
199  , pFlags(in_pFlags)
200  , eOpenMode(in_eOpenMode) {}
201 
202  AkFileOpenData(AkFileID in_idFile, AkOpenMode in_eOpenMode = AK_OpenModeRead, AkFileSystemFlags* in_pFlags = NULL)
203  : pszFileName(NULL)
204  , fileID(in_idFile)
205  , pFlags(in_pFlags)
206  , eOpenMode(in_eOpenMode) {}
207 
208  AkFileOpenData(const AkOSChar* in_pszFileName, AkFileSystemFlags* in_pFlags)
209  : pszFileName(in_pszFileName)
211  , pFlags(in_pFlags)
213 
215  : pszFileName(NULL)
216  , fileID(in_idFile)
217  , pFlags(in_pFlags)
219 
220  bool IsValid() const
221  {
222  return (pszFileName != NULL) || (fileID != AK_INVALID_FILE_ID);
223  }
224 
225  const AkOSChar* pszFileName; ///< File name. Only one of pszFileName or fileID should be valid (pszFileName null while fileID is not AK_INVALID_FILE_ID, or vice versa)
226  AkFileID fileID; ///< File ID. Only one of pszFileName or fileID should be valid (pszFileName null while fileID is not AK_INVALID_FILE_ID, or vice versa)
227  AkFileSystemFlags* pFlags; ///< Flags for opening, null when unused
228  AkOpenMode eOpenMode; ///< Open mode.
229 };
230 
231 #pragma pack(pop)
232 
233 //@}
234 
235 namespace AK
236 {
237  /// \name Profiling interfaces.
238  //@{
239 
240  /// Profiling interface of streams.
241  /// \akwarning
242  /// The functions in this interface are not thread-safe, unless stated otherwise.
243  /// \endakwarning
245  {
246  protected:
247  /// Virtual destructor on interface to avoid warnings.
248  virtual ~IAkStreamProfile(){}
249 
250  public:
251  /// Returns the stream's record (once).
252  /// \sa
253  /// - \ref streamingdevicemanager
254  virtual void GetStreamRecord(
255  AkStreamRecord & out_streamRecord ///< Returned stream record interface
256  ) = 0;
257 
258  /// Returns the stream's statistics (every profile frame).
259  /// \sa
260  /// - \ref streamingdevicemanager
261  virtual void GetStreamData(
262  AkStreamData & out_streamData ///< Returned periodic stream data interface
263  ) = 0;
264 
265  /// Query the stream's "new" flag.
266  /// \return True, until AK::IAkStreamProfile::ClearNew() is called.
267  /// \sa
268  /// - \ref streamingdevicemanager
269  virtual bool IsNew() = 0;
270 
271  /// Resets the stream's "new" flag.
272  /// \sa
273  /// - \ref streamingdevicemanager
274  virtual void ClearNew() = 0;
275  };
276 
277 
278  /// Profiling interface of high-level I/O devices.
279  /// \akwarning
280  /// The functions in this interface are not thread-safe, unless stated otherwise.
281  /// \endakwarning
283  {
284  protected:
285  /// Virtual destructor on interface to avoid warnings.
286  virtual ~IAkDeviceProfile(){}
287 
288  public:
289 
290  /// Notify device when monitor sampling starts.
291  virtual void OnProfileStart() = 0;
292 
293  /// Notify device when monitor sampling ends.
294  virtual void OnProfileEnd() = 0;
295 
296  /// Query the device's description (once).
297  /// \sa
298  /// - \ref streamingdevicemanager
299  virtual void GetDesc(
300  AkDeviceDesc & out_deviceDesc ///< Device descriptor.
301  ) = 0;
302 
303  /// Query the device's statistics (at every profiling frame).
304  /// \sa
305  /// - \ref streamingdevicemanager
306  virtual void GetData(
307  AkDeviceData & out_deviceData ///< Device data.
308  ) = 0;
309 
310  /// Query the device's "new" flag.
311  /// \return True, until ClearNew() is called.
312  /// \sa
313  /// - \ref streamingdevicemanager
314  virtual bool IsNew() = 0;
315 
316  /// Resets the device's "new" flag.
317  /// \sa
318  /// - \ref streamingdevicemanager
319  virtual void ClearNew() = 0;
320 
321  /// Get the number of streams currently associated with that device.
322  /// \return The number of streams
323  /// \sa
324  /// - \ref streamingdevicemanager
325  virtual AkUInt32 GetNumStreams() = 0;
326 
327  /// Get a stream profile, for a specified stream index.
328  /// \remarks GetStreamProfile() refers to streams by index, which must honor the call to AK::IAkDeviceProfile::GetNumStreams().
329  /// \sa
330  /// - \ref streamingdevicemanager
332  AkUInt32 in_uStreamIndex ///< Stream index: [0,numStreams[
333  ) = 0;
334  };
335 
336  /// Profiling interface of the Stream Manager.
337  /// \akwarning
338  /// The functions in this interface are not thread-safe, unless stated otherwise.
339  /// \endakwarning
341  {
342  protected:
343  /// Virtual destructor on interface to avoid warnings.
345 
346  public:
347  /// Start profile monitoring.
348  /// \return AK_Success if successful, AK_Fail otherwise.
349  /// \sa
350  /// - \ref streamingdevicemanager
351  virtual AKRESULT StartMonitoring() = 0;
352 
353  /// Stop profile monitoring.
354  /// \sa
355  /// - \ref streamingdevicemanager
356  virtual void StopMonitoring() = 0;
357 
358  /// Device enumeration.
359  /// \return The number of devices.
360  /// \sa
361  /// - \ref streamingdevicemanager
362  virtual AkUInt32 GetNumDevices() = 0;
363 
364  /// Get a device profile for a specified device index.
365  /// \remarks GetDeviceProfile() refers to devices by index, which must honor the call to AK::IAkStreamMgrProfile::GetNumDevices().
366  /// \remarks The device index is not the same as the device ID (AkDeviceID).
367  /// \sa
368  /// - \ref streamingdevicemanager
370  AkUInt32 in_uDeviceIndex ///< Device index: [0,numDevices[
371  ) = 0;
372  };
373  //@}
374 
375  /// \name High-level streams API.
376  //@{
377 
378  /// Interface of standard streams. Used as a handle to a standard stream. Has methods for
379  /// stream control. Obtained through the Stream Manager's AK::IAkStreamMgr::CreateStd() method.
380  /// \akwarning
381  /// The functions in this interface are not thread-safe, unless stated otherwise.
382  /// \endakwarning
384  {
385  protected:
386  /// Virtual destructor on interface to avoid warnings.
387  virtual ~IAkStdStream(){}
388 
389  public:
390  /// \name Stream management and settings.
391  //@{
392  /// Close the stream. The object is destroyed and the interface becomes invalid.
393  /// \sa
394  /// - \ref streamingdevicemanager
395  virtual void Destroy() = 0;
396 
397  /// Get information about a stream.
398  /// \sa
399  /// - \ref streamingdevicemanager
400  virtual void GetInfo(
401  AkStreamInfo & out_info ///< Returned stream info
402  ) = 0;
403 
404  /// Returns a unique cookie for a given stream.
405  /// The default implementation of the Stream Manager returns its file descriptor (see AkStreamMgrModule.h).
406  virtual void * GetFileDescriptor() = 0;
407 
408  /// Give the stream a name (appears in the Wwise Profiler).
409  /// \sa
410  /// - \ref streamingdevicemanager
412  const AkOSChar * in_pszStreamName ///< Stream name
413  ) = 0;
414 
415  /// Get the I/O block size.
416  /// \remark Queries the low-level I/O, by calling AK::StreamMgr::IAkLowLevelIOHook::GetBlockSize() with the
417  /// stream's file descriptor.
418  /// \return The block size, in bytes.
419  /// \sa
420  /// - \ref streamingdevicemanager
421  virtual AkUInt32 GetBlockSize() = 0;
422  //@}
423 
424  /// \name I/O operations.
425  //@{
426 
427  /// Schedule a read request.
428  /// \warning Use only with a multiple of the block size, queried via AK::IAkStdStream::GetBlockSize().
429  /// \remarks If the call is asynchronous (in_bWait = false), wait until AK::IAkStdStream::GetStatus() stops returning AK_StmStatusPending.
430  /// \return AK_Success if the operation was successfully scheduled (but not necessarily completed)
431  /// \sa
432  /// - \ref streamingdevicemanager
433  virtual AKRESULT Read(
434  void * in_pBuffer, ///< User buffer address
435  AkUInt32 in_uReqSize, ///< Requested read size
436  bool in_bWait, ///< Block until the operation is complete
437  AkPriority in_priority, ///< Heuristic: operation priority
438  AkReal32 in_fDeadline, ///< Heuristic: operation deadline (ms)
439  AkUInt32 & out_uSize ///< The size that was actually read
440  ) = 0;
441 
442  /// Schedule a write request.
443  /// \warning Use only with a multiple of the block size, queried via AK::IAkStdStream::GetBlockSize().
444  /// \remarks If the call is asynchronous (in_bWait = false), wait until GetStatus() stops returning AK_StmStatusPending.
445  /// \return AK_Success if the operation was successfully scheduled
446  /// \sa
447  /// - \ref streamingdevicemanager
448  virtual AKRESULT Write(
449  void * in_pBuffer, ///< User buffer address
450  AkUInt32 in_uReqSize, ///< Requested write size
451  bool in_bWait, ///< Block until the operation is complete
452  AkPriority in_priority, ///< Heuristic: operation priority
453  AkReal32 in_fDeadline, ///< Heuristic: operation deadline (ms)
454  AkUInt32 & out_uSize ///< The size that was actually written
455  ) = 0;
456 
457  /// Get the current stream position.
458  /// \remarks If an operation is pending, there is no guarantee that the position was queried before (or after) the operation was completed.
459  /// \return The current stream position
460  /// \sa
461  /// - \ref streamingdevicemanager
463  bool * out_pbEndOfStream ///< Returned end-of-stream flag, only for streams opened with AK_OpenModeRead (can pass NULL)
464  ) = 0;
465 
466  /// Set the stream position. Modifies the position for the next read/write operation.
467  /// \warning No operation should be pending.
468  /// \remarks The new position will snap to the lowest block boundary.
469  /// \return AK_Success if the stream position was changed
470  /// \sa
471  /// - \ref streamingdevicemanager
473  AkInt64 in_iMoveOffset, ///< Seek offset
474  AkMoveMethod in_eMoveMethod ///< Seek method, from the beginning, end, or current file position
475  ) = 0;
476 
477  /// Cancel the current operation.
478  /// \remarks When it returns, the caller is guaranteed that no operation is pending.
479  /// \remarks This method can block the caller for the whole duration of the I/O operation, if the request was already posted.
480  /// \sa
481  /// - \ref streamingdevicemanager
482  virtual void Cancel() = 0;
483 
484  //@}
485 
486  /// \name Access to data and status.
487  //@{
488  /// Get user data (and accessed size).
489  /// \return The address of data provided by user
490  /// \sa
491  /// - \ref streamingdevicemanager
492  virtual void* GetData(
493  AkUInt32& out_uSize ///< Size actually read or written
494  ) = 0;
495 
496  /// Get the stream's status.
497  /// \return The stream status.
498  /// \sa
499  /// - \ref streamingdevicemanager
500  virtual AkStmStatus GetStatus() = 0;
501 
502  /// Block and wait for a pending read to finish, and return the current status of the stream.
503  /// This will return immediately if the status is not pending.
504  /// \return The stream status.
505  /// \sa
506  /// - \ref streamingdevicemanager
508 
509  //@}
510  };
511 
512 
513  /// Interface of automatic streams. It is used as a handle to a stream,
514  /// I/O operations are triggered from here.
515  /// Obtained through the Stream Manager's AK::IAkStreamMgr::CreateAuto() method.
516  /// \akwarning
517  /// The functions in this interface are not thread-safe, unless stated otherwise.
518  /// \endakwarning
519  /// \sa
520  /// - \ref streamingdevicemanager
522  {
523  protected:
524  /// Virtual destructor on interface to avoid warnings.
525  virtual ~IAkAutoStream(){}
526 
527  public:
528  /// \name Stream management, settings access, and run-time change.
529  //@{
530  /// Close the stream. The object is destroyed and the interface becomes invalid.
531  /// \sa
532  /// - \ref streamingdevicemanager
533  virtual void Destroy() = 0;
534 
535  /// Get information about the stream.
536  /// \sa
537  /// - \ref streamingdevicemanager
538  virtual void GetInfo(
539  AkStreamInfo & out_info ///< Returned stream info
540  ) = 0;
541 
542  /// Returns a unique cookie for a given stream.
543  /// The default implementation of the Stream Manager returns its file descriptor (see AkStreamMgrModule.h).
544  virtual void * GetFileDescriptor() = 0;
545 
546  /// Get the stream's heuristics.
547  /// \sa
548  /// - \ref streamingdevicemanager
549  virtual void GetHeuristics(
550  AkAutoStmHeuristics & out_heuristics///< Returned stream heuristics
551  ) = 0;
552 
553  /// Run-time change of the stream's heuristics.
554  /// \sa
555  /// - \ref streamingdevicemanager
557  const AkAutoStmHeuristics & in_heuristics ///< New stream heuristics
558  ) = 0;
559 
560  /// Run-time change of the stream's minimum buffer size that can be handed out to client
561  /// in GetBuffer() (except the last buffer at the end of file).
562  /// Corresponds to the uMinBufferSize field of the AkAutoStmBufSettings passed to CreateAuto().
563  /// \sa
564  /// - AkAutoStmBufSettings
565  /// - \ref streamingdevicemanager
567  AkUInt32 in_uMinBufferSize ///< Minimum buffer size that can be handed out to client.
568  ) = 0;
569 
570  /// Give the stream a name (appears in the Wwise profiler).
571  /// \sa
572  /// - \ref streamingdevicemanager
574  const AkOSChar * in_pszStreamName ///< Stream name
575  ) = 0;
576 
577  /// Get the I/O block size.
578  /// \remark Queries the actual low-level I/O device, by calling AK::StreamMgr::IAkLowLevelIOHook::GetBlockSize() with the
579  /// stream's file descriptor.
580  /// \return The block size (in bytes)
581  /// \sa
582  /// - \ref streamingdevicemanager
583  virtual AkUInt32 GetBlockSize() = 0;
584 
585  /// Get the amount of buffering that the stream has.
586  /// The buffering is defined as the number of bytes that the stream has buffered, excluding the number
587  /// of bytes that is currently granted to the user (with GetBuffer()).
588  /// \remark The returned value corresponds to the buffering status at that moment, and does not even
589  /// guarantee that it will not shrink.
590  /// \return
591  /// - AK_DataReady: Some data has been buffered (out_uNumBytesAvailable is greater than 0).
592  /// - AK_NoDataReady: No data is available, and the end of file has not been reached.
593  /// - AK_NoMoreData: Some or no data is available, but the end of file has been reached. The stream will not buffer any more data.
594  /// - AK_Fail: The stream is invalid due to an I/O error.
596  AkUInt32 & out_uNumBytesAvailable ///< Number of bytes available in the stream's buffer(s).
597  ) = 0;
598 
599  /// Returns the target buffering size based on the throughput heuristic.
600  /// \return
601  /// Target buffering length expressed in bytes.
603 
604  //@}
605 
606  /// \name Stream operations.
607  //@{
608 
609  /// Start the automatic scheduling.
610  /// \return AK_Success if the automatic scheduling was started successfully
611  /// \sa
612  /// - \ref streamingdevicemanager
613  virtual AKRESULT Start() = 0;
614 
615  /// Stop the automatic scheduling.
616  /// \return AK_Success if the automatic scheduling was stopped successfully.
617  /// \sa
618  /// - \ref streamingdevicemanager
619  virtual AKRESULT Stop() = 0;
620 
621  /// Get the stream's position.
622  /// \remarks The stream position is the position seen by the user, not the position of the file
623  /// already streamed into the Stream Manager's memory. The stream position is updated when buffers
624  /// are released, using AK::IAkAutoStream::ReleaseBuffer().
625  /// \return The file position in bytes of the beginning of the first buffer owned by the user.
626  /// If the user does not own a buffer, it returns the position of the beginning of the buffer that
627  /// would be returned from a call to AK::IAkAutoStream::GetBuffer().
628  /// \sa
629  /// - \ref streamingdevicemanager
631  bool * out_pbEndOfStream ///< Returned end-of-stream flag (can pass NULL)
632  ) = 0;
633 
634  /// Set the stream's position.
635  /// The next call to AK::IAkAutoStream::GetBuffer() will grant data that corresponds to the position specified here.
636  /// \remarks Data already streamed into the Stream Manager's memory might be flushed.
637  /// \remarks The new position will round down to the low-level I/O block size.
638  /// \return AK_Success if the resulting position is valid
639  /// \sa
640  /// - \ref streamingdevicemanager
642  AkInt64 in_iMoveOffset, ///< Seek offset
643  AkMoveMethod in_eMoveMethod ///< Seek method, from the beginning, end or current file position|
644  ) = 0;
645 
646  //@}
647 
648 
649  /// \name Data/status access.
650  //@{
651 
652  /// Get data from the Stream Manager buffers.
653  /// \remarks Grants a buffer if data is available. Each successful call to this method returns a new
654  /// buffer of data, at the current stream position.
655  /// Buffers should be released as soon as they are not needed, using AK::IAkAutoStream::ReleaseBuffer().
656  /// \aknote AK::IAkAutoStream::ReleaseBuffer() does not take any argument, because it releases buffers in order. \endaknote
657  /// \return
658  /// - AK_DataReady : the buffer was granted
659  /// - AK_NoDataReady : the buffer is not granted yet (never happens when called with in_bWait flag)
660  /// - AK_NoMoreData : the buffer was granted but reached end of file (next call will return with size 0)
661  /// - AK_Fail : there was an I/O error
662  /// \sa
663  /// - \ref streamingdevicemanager
665  void *& out_pBuffer, ///< Returned address of granted data space
666  AkUInt32 & out_uSize, ///< Returned size of granted data space
667  bool in_bWait ///< Block until data is ready
668  ) = 0;
669 
670  /// Release buffer granted through GetBuffer(). Buffers are released in order.
671  /// \return AK_Success if a valid buffer was released, AK_Fail if the user did not own any buffer.
672  /// \note To implementers: Clients like the sound engine may release buffers until this function returns AK_Fail.
673  /// Failing to release a buffer should not be considered as a fatal error.
674  /// \sa
675  /// - \ref streamingdevicemanager
676  virtual AKRESULT ReleaseBuffer() = 0;
677  //@}
678  };
679 
680  //@}
681 
682 
683  /// Interface of the Stream Manager.
684  /// \akwarning
685  /// The functions in this interface are not thread-safe, unless stated otherwise.
686  /// \endakwarning
688  {
689  protected:
690  /// Virtual destructor on interface to avoid warnings.
691  virtual ~IAkStreamMgr(){}
692 
693  public:
694  /// Global access to singleton.
695  /// \return The interface of the global Stream Manager
696  /// \sa
697  /// - \ref streamingdevicemanager
698  inline static IAkStreamMgr * Get()
699  {
700  return m_pStreamMgr;
701  }
702 
703  /// Destroy the Stream Manager.
704  /// \sa
705  /// - \ref streamingdevicemanager
706  virtual void Destroy() = 0;
707 
708 
709  /// \name Profiling.
710  //@{
711  /// Get the profiling interface.
712  /// \return The interface of the Stream Manager profiler
714  //@}
715 
716 
717  /// \name Stream creation interface.
718  //@{
719 
720  // Standard stream creation methods.
721 
722  /// Create a standard stream (string overload).
723  /// \return AK_Success if the stream was created successfully
724  /// \remarks The string overload of AK::StreamMgr::IAkFileLocationResolver::Open() will be called.
725  /// \sa
726  /// - \ref streamingdevicemanager
728  const AkFileOpenData& in_FileOpen, ///< File name or file ID (only one should be valid), open flags, open mode
729  IAkStdStream *& out_pStream, ///< Returned interface to a standard stream. If the function does not return AK_Success, this pointer is left untouched.
730  bool in_bSyncOpen ///< If true, force the Stream Manager to open file synchronously. Otherwise, it is left to its discretion.
731  ) = 0;
732 
733  // Automatic stream create methods.
734  /// Create an automatic stream.
735  /// \return AK_Success if the stream was created successfully
736  /// \remarks Automatic streams can only be in Read mode.
737  /// \remarks The stream needs to be started explicitly with AK::IAkAutoStream::Start().
738  /// \remarks This call will eventually delegate the operation to AK::StreamMgr::IAkFileLocationResolver::Open().
739  /// \sa
740  /// - \ref streamingdevicemanager
742  const AkFileOpenData& in_FileOpen, ///< File name or file ID (only one should be valid), open flags, open mode
743  const AkAutoStmHeuristics & in_heuristics, ///< Streaming heuristics
744  AkAutoStmBufSettings * in_pBufferSettings, ///< Stream buffer settings (it is recommended to pass NULL in order to use the default settings)
745  IAkAutoStream *& out_pStream, ///< Returned interface to an automatic stream. If the function does not return AK_Success, this pointer is left untouched.
746  bool in_bSyncOpen, ///< If true, force the Stream Manager to open file synchronously. Otherwise, it is left to its discretion.
747  bool in_bCaching = false ///< Does this stream stay in cache
748  ) = 0;
749 
750  /// Create an automatic stream (in-memory buffer overload).
751  ///
752  /// This overload differs largely from CreateAuto() implementations, which are file based.
753  /// This version is provided with a memory space and the resulting automatic stream will simply
754  /// return the memory space in a similar fashion, but without the need to perform any actual file operations.
755  ///
756  /// If you are in the process of implementing your own IAkStreamMgr object,
757  /// consider using the initial implementation from `\\SDK\\source\\StreamManager\\Common\\AkStreamMgr.cpp`.
758  ///
759  /// \return AK_Success if the stream was created successfully
760  /// \remarks The stream needs to be started explicitly with IAkAutoStream::Start().
761  /// \sa
762  /// - \ref streamingdevicemanager
764  void * in_pBuffer, ///< Pointer to the memory area containing stream data
765  AkUInt64 in_uSize, ///< Size of the memory area containing stream data
766  const AkAutoStmHeuristics & in_heuristics, ///< Streaming heuristics
767  IAkAutoStream *& out_pStream ///< Returned interface to an automatic stream. If the function does not return AK_Success, this pointer is left untouched.
768  ) = 0;
769 
770  /// Start streaming the first "in_pFSFlags->uNumBytesPrefetch" bytes of the file with id "in_fileID" into cache. The stream will be scheduled only after
771  /// all regular streams (not file caching streams) are serviced. The file will stay cached until either the UnpinFileInCache is called,
772  /// or the limit as set by uMaxCachePinnedBytes is reached and another higher priority file (in_uPriority) needs the space.
773  /// \remarks PinFileInCache()/UnpinFileInCache()/UpdateCachingPriority() are typically not used directly, but instead used via the AK::SoundEngine::PinEventInStreamCache() API.
774  /// Using PinFileInCache() directly does not allow users to take advantage of sound bank data. The file and the number of bytes they wish to cache must be explicitly specified.
775  ///
776  /// \sa
777  /// - \ref streamingdevicemanager
778  /// - AK::SoundEngine::PinEventInStreamCache
779  /// - AK::SoundEngine::UnpinEventInStreamCache
780  /// - AkFileSystemFlags
782  AkFileID in_fileID, ///< Application-defined ID
783  AkFileSystemFlags * in_pFSFlags, ///< Special file system flags (can NOT pass NULL)
784  AkPriority in_uPriority ///< Stream caching priority. Note: Caching requests only get serviced after all regular streaming requests.
785  ) = 0;
786 
787  /// Un-pin a file that has been previouly pinned into cache. This function must be called once for every call to PinFileInCache() with the same file id.
788  /// The file may still remain in stream cache after this is called, until the memory is reused by the streaming memory manager in accordance with to its
789  /// cache management algorithm.
790  /// \remarks PinFileInCache()/UnpinFileInCache()/UpdateCachingPriority() are typically not used directly, but instead used via the AK::SoundEngine::PinEventInStreamCache() API.
791  /// Using UnpinFileInCache() directly does not allow users to take advantage of sound bank data. The file must be explicitly specified.
792  /// \sa
793  /// - \ref streamingdevicemanager
794  /// - AK::SoundEngine::PinEventInStreamCache
795  /// - AK::SoundEngine::UnpinEventInStreamCache
797  AkFileID in_fileID, ///< Application-defined ID
798  AkPriority in_uPriority ///< Priority of stream that you are unpinning
799  ) = 0;
800 
801  /// Update the priority of the caching stream. Higher priority streams will be serviced before lower priority caching streams, and will be more likely to stay in
802  /// memory if the cache pin limit as set by "uMaxCachePinnedBytes" is reached.
803  /// \remarks PinFileInCache()/UnpinFileInCache()/UpdateCachingPriority() are typically not used directly, but instead used via the AK::SoundEngine::PinEventInStreamCache() API.
804  /// Using UpdateCachingPriority() directly does not allow users to take advantage of sound bank data. The file must be explicitly specified.
805  /// \sa
806  /// - \ref streamingdevicemanager
807  /// - AK::SoundEngine::PinEventInStreamCache
808  /// - AK::SoundEngine::UnpinEventInStreamCache
810  AkFileID in_fileID, ///< Application-defined ID
811  AkPriority in_uPriority, ///< Priority
812  AkPriority in_uOldPriority ///< Old priority
813  ) = 0;
814 
815  /// Return information about a file that has been pinned into cache.
816  /// Retrieves the percentage of the requested buffer size that has been streamed in and stored into stream cache, and whether
817  /// the cache pinned memory limit is preventing this buffer from filling.
819  AkFileID in_fileID, ///< Application-defined ID
820  AkReal32& out_fPercentBuffered, ///< Percentage of buffer full (out of 100)
821  bool& out_bCacheFull ///< Set to true if the rest of the buffer can not fit into the cache-pinned memory limit.
822  ) = 0;
823 
824  /// Make a memory stream point to a new area in memory, otherwise keeping the exact same state.
826  IAkAutoStream * in_pStream, ///< The stream to relocate. Must be a stream created with the memory overload of CreateAutoStm.
827  AkUInt8 * in_pNewStart ///< The new area in memory to point to
828  ) = 0;
829 
830  //@}
831 
832  protected:
833  /// Definition of the global pointer to the interface of the Stream Manager singleton.
834  /// \sa
835  /// - \ref streamingdevicemanager
837  };
838 
839 }
840 #endif //_IAK_STREAM_MGR_H_
bool bIsOpen
True when the file is open (implementations may defer file opening)
Definition: IAkStreamMgr.h:89
const AkOSChar * pszFileName
File name. Only one of pszFileName or fileID should be valid (pszFileName null while fileID is not AK...
Definition: IAkStreamMgr.h:225
AkUInt32 uCachePinnedBytes
Number of bytes that can be pinned into cache.
Definition: IAkStreamMgr.h:151
static IAkStreamMgr * Get()
Definition: IAkStreamMgr.h:698
AkUInt32 uBufferedSize
Size of available data (specific to IAkAutoStream)
Definition: IAkStreamMgr.h:176
virtual void * GetData(AkUInt32 &out_uSize)=0
AkUInt64 uLoopEnd
Set to the end of loop (byte offset from the beginning of the stream) for streams that loop,...
Definition: IAkStreamMgr.h:98
virtual IAkStreamMgrProfile * GetStreamMgrProfile()=0
Definition of data structures for AkAudioObject
#define AK_MONITOR_DEVICENAME_MAXLENGTH
Definition: IAkStreamMgr.h:43
AkDeviceID deviceID
Device ID
Definition: IAkStreamMgr.h:86
virtual bool IsNew()=0
AkUInt64 uFileSize
File size
Definition: IAkStreamMgr.h:162
virtual AKRESULT SetMinimalBufferSize(AkUInt32 in_uMinBufferSize)=0
virtual AkUInt64 GetPosition(bool *out_pbEndOfStream)=0
bool bCanRead
Specifies whether or not the device is readable
Definition: IAkStreamMgr.h:127
Automatic streams buffer settings/constraints.
Definition: IAkStreamMgr.h:108
AkUInt32 uPriority
Stream priority
Definition: IAkStreamMgr.h:172
virtual void * GetFileDescriptor()=0
virtual AKRESULT CreateStd(const AkFileOpenData &in_FileOpen, IAkStdStream *&out_pStream, bool in_bSyncOpen)=0
virtual IAkDeviceProfile * GetDeviceProfile(AkUInt32 in_uDeviceIndex)=0
AkUInt32 uVirtualBufferingSize
Size of available data including requested data (specific to IAkAutoStream)
Definition: IAkStreamMgr.h:175
virtual AKRESULT ReleaseBuffer()=0
AkUInt32 uPeakRefdMemUsed
Memory peak since monitoring started
Definition: IAkStreamMgr.h:140
virtual ~IAkStreamMgr()
Virtual destructor on interface to avoid warnings.
Definition: IAkStreamMgr.h:691
@ AK_OpenModeWriteOvrwr
Write-only access (deletes the file if it already exists)
Definition: IAkStreamMgr.h:76
virtual void GetInfo(AkStreamInfo &out_info)=0
virtual AkUInt32 GetBlockSize()=0
AKRESULT
Standard function call result.
Definition: AkTypes.h:134
AkUInt32 AkDeviceID
I/O device ID
Definition: AkTypes.h:78
virtual AkUInt32 GetNumStreams()=0
@ AK_OpenModeReadWrite
Read and write access
Definition: IAkStreamMgr.h:77
AkUInt32 uNumBytesTransferedLowLevel
Transfered amount (from low-level IO only) since last query (Accumulate/Reset)
Definition: IAkStreamMgr.h:178
virtual void GetStreamData(AkStreamData &out_streamData)=0
@ AK_OpenModeRead
Read-only access
Definition: IAkStreamMgr.h:74
AkUInt32 uBlockSize
Hard user constraint: When non-zero, buffer size will be a multiple of that number,...
Definition: IAkStreamMgr.h:114
virtual AKRESULT Stop()=0
bool bIsAutoStream
True for auto streams
Definition: IAkStreamMgr.h:163
AkUInt32 uLowLevelBytesTransferred
Number of bytes transferred exclusively via low-level
Definition: IAkStreamMgr.h:145
virtual void OnProfileEnd()=0
Notify device when monitor sampling ends.
char AkOSChar
Generic character string
Definition: AkTypes.h:60
uint8_t AkUInt8
Unsigned 8-bit integer
virtual AkUInt32 GetNominalBuffering()=0
@ AK_MoveEnd
Move offset from the end of the stream
Definition: IAkStreamMgr.h:68
virtual AkUInt32 GetBlockSize()=0
bool bIsLanguageSpecific
True when the file was found in a language specific location
Definition: IAkStreamMgr.h:90
virtual AkStmStatus GetStatus()=0
virtual AKRESULT Read(void *in_pBuffer, AkUInt32 in_uReqSize, bool in_bWait, AkPriority in_priority, AkReal32 in_fDeadline, AkUInt32 &out_uSize)=0
@ AK_MoveBegin
Move offset from the start of the stream
Definition: IAkStreamMgr.h:66
#define NULL
Definition: AkTypes.h:46
bool IsValid() const
Definition: IAkStreamMgr.h:220
float AkReal32
32-bit floating point
AkUInt32 uStreamID
Unique stream identifier
Definition: IAkStreamMgr.h:170
virtual void OnProfileStart()=0
Notify device when monitor sampling starts.
Stream statistics.
Definition: IAkStreamMgr.h:169
AkUInt32 uStringSize
Device name string's size (number of characters)
Definition: IAkStreamMgr.h:129
AkUInt16 AkUtf16
Definition: AkTypes.h:61
@ AK_StmStatusIdle
The stream is idle
Definition: IAkStreamMgr.h:53
AkUInt32 AkFileID
Integer-type file identifier
Definition: AkTypes.h:77
virtual AKRESULT SetStreamName(const AkOSChar *in_pszStreamName)=0
virtual void GetData(AkDeviceData &out_deviceData)=0
virtual void ClearNew()=0
Device descriptor.
Definition: IAkStreamMgr.h:134
AkOpenMode eOpenMode
Open mode.
Definition: IAkStreamMgr.h:228
virtual ~IAkStreamMgrProfile()
Virtual destructor on interface to avoid warnings.
Definition: IAkStreamMgr.h:344
virtual void StopMonitoring()=0
virtual AKRESULT SetHeuristics(const AkAutoStmHeuristics &in_heuristics)=0
#define AKSOUNDENGINE_API
AkUInt64 uLoopStart
Set to the start of loop (byte offset from the beginning of the stream) for streams that loop,...
Definition: IAkStreamMgr.h:97
AkUInt32 uTargetBufferingSize
Total stream buffer size (specific to IAkAutoStream)
Definition: IAkStreamMgr.h:174
AkReal32 fThroughput
Average throughput in bytes/ms
Definition: IAkStreamMgr.h:96
virtual AKRESULT SetStreamName(const AkOSChar *in_pszStreamName)=0
AkUInt32 uGranularity
IO memory pool block size
Definition: IAkStreamMgr.h:142
AkUInt32 uFrees
Cumulative number of deallocations
Definition: IAkStreamMgr.h:139
AkFileID idFile
Definition: IAkStreamMgr.h:160
virtual AkStmStatus WaitForPendingOperation()=0
AkUInt32 uNumLowLevelRequestsCancelled
Number of low-level transfers that were cancelled in the previous monitoring frame
Definition: IAkStreamMgr.h:148
virtual AKRESULT CreateAuto(void *in_pBuffer, AkUInt64 in_uSize, const AkAutoStmHeuristics &in_heuristics, IAkAutoStream *&out_pStream)=0
bool bActive
True if this stream has been active (that is, was ready for I/O or had at least one pending I/O trans...
Definition: IAkStreamMgr.h:181
AkFileOpenData(AkFileID in_idFile, AkFileSystemFlags *in_pFlags)
Definition: IAkStreamMgr.h:214
AkUInt32 uMemUsed
IO memory pool used
Definition: IAkStreamMgr.h:137
@ AK_MoveCurrent
Move offset from the current stream position
Definition: IAkStreamMgr.h:67
virtual void Destroy()=0
AkUInt32 uStreamID
Unique stream identifier
Definition: IAkStreamMgr.h:157
@ AK_StmStatusPending
Operation pending / The stream is waiting for I/O
Definition: IAkStreamMgr.h:55
virtual ~IAkDeviceProfile()
Virtual destructor on interface to avoid warnings.
Definition: IAkStreamMgr.h:286
Stream general information.
Definition: IAkStreamMgr.h:156
virtual AKRESULT RelocateMemoryStream(IAkAutoStream *in_pStream, AkUInt8 *in_pNewStart)=0
Make a memory stream point to a new area in memory, otherwise keeping the exact same state.
AkInt8 AkPriority
Priority
Definition: AkTypes.h:67
virtual AKRESULT StartMonitoring()=0
AkDeviceID deviceID
Device ID
Definition: IAkStreamMgr.h:125
AkUInt32 uNumActiveStreams
Number of streams that have been active in the previous frame
Definition: IAkStreamMgr.h:143
virtual AKRESULT QueryBufferingStatus(AkUInt32 &out_uNumBytesAvailable)=0
const AkOSChar * pszName
User-defined stream name (specified through AK::IAkStdStream::SetStreamName() or AK::IAkAutoStream::S...
Definition: IAkStreamMgr.h:87
AkUInt32 uCustomParam
Custom number queried from low-level IO.
Definition: IAkStreamMgr.h:150
virtual ~IAkStdStream()
Virtual destructor on interface to avoid warnings.
Definition: IAkStreamMgr.h:387
AkUInt32 uTotalBytesTransferred
Number of bytes transferred, including cached transfers
Definition: IAkStreamMgr.h:144
virtual void GetInfo(AkStreamInfo &out_info)=0
virtual AKRESULT PinFileInCache(AkFileID in_fileID, AkFileSystemFlags *in_pFSFlags, AkPriority in_uPriority)=0
AkUInt32 uUnreferencedCachedBytes
IO memory that is cached but is not currently used for active streams.
Definition: IAkStreamMgr.h:141
AkDeviceID deviceID
Device ID
Definition: IAkStreamMgr.h:158
virtual void Destroy()=0
virtual IAkStreamProfile * GetStreamProfile(AkUInt32 in_uStreamIndex)=0
virtual AKRESULT GetBuffer(void *&out_pBuffer, AkUInt32 &out_uSize, bool in_bWait)=0
AkReal32 fEstimatedThroughput
Estimated throughput heuristic
Definition: IAkStreamMgr.h:180
virtual void GetHeuristics(AkAutoStmHeuristics &out_heuristics)=0
AkUInt32 uAllocs
Cumulative number of allocations
Definition: IAkStreamMgr.h:138
File system flags for file descriptors mapping.
AkMoveMethod
Definition: IAkStreamMgr.h:65
AkUInt32 uMemSize
IO memory pool size
Definition: IAkStreamMgr.h:136
AkUInt32 uNumLowLevelRequestsPending
Number of low-level transfers that are currently pending
Definition: IAkStreamMgr.h:149
int64_t AkInt64
Signed 64-bit integer
@ AK_OpenModeWrite
Write-only access (opens the file if it already exists)
Definition: IAkStreamMgr.h:75
uint64_t AkUInt64
Unsigned 64-bit integer
@ AK_StmStatusCompleted
Operation completed / Automatic stream reached end
Definition: IAkStreamMgr.h:54
AkUInt32 uNumBytesTransfered
Transfered amount since last query (Accumulate/Reset)
Definition: IAkStreamMgr.h:177
virtual void GetDesc(AkDeviceDesc &out_deviceDesc)=0
AkStmStatus
Stream status.
Definition: IAkStreamMgr.h:52
bool bCanWrite
Specifies whether or not the device is writable
Definition: IAkStreamMgr.h:126
AkFileSystemFlags * pFlags
Flags for opening, null when unused
Definition: IAkStreamMgr.h:227
AkOpenMode
File open mode.
Definition: IAkStreamMgr.h:73
Device descriptor.
Definition: IAkStreamMgr.h:124
AkUInt32 uNumLowLevelRequestsCompleted
Number of low-level transfers that have completed in the previous monitoring frame
Definition: IAkStreamMgr.h:147
AkUInt64 uSize
Total stream/file size in bytes
Definition: IAkStreamMgr.h:88
virtual ~IAkAutoStream()
Virtual destructor on interface to avoid warnings.
Definition: IAkStreamMgr.h:525
AkFileOpenData(AkFileID in_idFile, AkOpenMode in_eOpenMode=AK_OpenModeRead, AkFileSystemFlags *in_pFlags=NULL)
Definition: IAkStreamMgr.h:202
virtual AKRESULT Start()=0
virtual AKRESULT SetPosition(AkInt64 in_iMoveOffset, AkMoveMethod in_eMoveMethod)=0
AkReal32 fAvgCacheEfficiency
Total bytes from cache as a percentage of total bytes.
Definition: IAkStreamMgr.h:146
virtual AKRESULT SetPosition(AkInt64 in_iMoveOffset, AkMoveMethod in_eMoveMethod)=0
uint32_t AkUInt32
Unsigned 32-bit integer
static const AkFileID AK_INVALID_FILE_ID
Invalid file ID
Definition: AkTypes.h:104
AkFileOpenData(const AkOSChar *in_pszFileName, AkOpenMode in_eOpenMode=AK_OpenModeRead, AkFileSystemFlags *in_pFlags=NULL)
Definition: IAkStreamMgr.h:196
AkDeviceID deviceID
Device ID
Definition: IAkStreamMgr.h:135
virtual ~IAkStreamProfile()
Virtual destructor on interface to avoid warnings.
Definition: IAkStreamMgr.h:248
@ AK_StmStatusError
The low-level I/O reported an error
Definition: IAkStreamMgr.h:57
virtual AKRESULT CreateAuto(const AkFileOpenData &in_FileOpen, const AkAutoStmHeuristics &in_heuristics, AkAutoStmBufSettings *in_pBufferSettings, IAkAutoStream *&out_pStream, bool in_bSyncOpen, bool in_bCaching=false)=0
AkUtf16 szStreamName[AK_MONITOR_STREAMNAME_MAXLENGTH]
Stream name
Definition: IAkStreamMgr.h:159
virtual void Destroy()=0
AkFileOpenData(const AkOSChar *in_pszFileName, AkFileSystemFlags *in_pFlags)
Definition: IAkStreamMgr.h:208
AkUInt32 uStringSize
Stream name string's size (number of characters)
Definition: IAkStreamMgr.h:161
virtual AkUInt32 GetNumDevices()=0
AkPriority priority
The stream priority. it should be between AK_MIN_PRIORITY and AK_MAX_PRIORITY (included).
Definition: IAkStreamMgr.h:103
virtual void Cancel()=0
AkUInt32 uMemoryReferenced
Amount of streaming memory referenced by this stream
Definition: IAkStreamMgr.h:179
virtual AKRESULT Write(void *in_pBuffer, AkUInt32 in_uReqSize, bool in_bWait, AkPriority in_priority, AkReal32 in_fDeadline, AkUInt32 &out_uSize)=0
Automatic streams heuristics.
Definition: IAkStreamMgr.h:95
virtual AKRESULT UnpinFileInCache(AkFileID in_fileID, AkPriority in_uPriority)=0
bool bIsCachingStream
True for caching streams
Definition: IAkStreamMgr.h:164
static IAkStreamMgr * m_pStreamMgr
Definition: IAkStreamMgr.h:836
virtual void GetStreamRecord(AkStreamRecord &out_streamRecord)=0
AkUtf16 szDeviceName[AK_MONITOR_DEVICENAME_MAXLENGTH]
Device name
Definition: IAkStreamMgr.h:128
AkFileID fileID
File ID. Only one of pszFileName or fileID should be valid (pszFileName null while fileID is not AK_I...
Definition: IAkStreamMgr.h:226
#define AK_MONITOR_STREAMNAME_MAXLENGTH
Definition: IAkStreamMgr.h:42
virtual bool IsNew()=0
virtual AKRESULT GetBufferStatusForPinnedFile(AkFileID in_fileID, AkReal32 &out_fPercentBuffered, bool &out_bCacheFull)=0
virtual AKRESULT UpdateCachingPriority(AkFileID in_fileID, AkPriority in_uPriority, AkPriority in_uOldPriority)=0
virtual void * GetFileDescriptor()=0
AkUInt64 uFilePosition
Current position
Definition: IAkStreamMgr.h:173
virtual AkUInt64 GetPosition(bool *out_pbEndOfStream)=0
virtual void ClearNew()=0
@ AK_StmStatusCancelled
Operation cancelled
Definition: IAkStreamMgr.h:56

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요