> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/sound_8h_source.md).

# sound.h

[Go to the documentation of this file.](/s-adk-5.1-programmers-guide/readme/files/dir_15b7eb99384c20f55db7776b7b1ecdad/dir_7d99a5752ef00d9a9478541a793df8d8/dir_b95d7ee73b2963b5e37f0a7269e7a4c6/sound_8h.md)

```cpp
 1 #ifndef SOUND_H_20170901
 2 #define SOUND_H_20170901
 3 
 6 #include <stdio.h>
 7 
 8 #if defined VFI_SOUND_EXPORT // Export
 9 # if defined _VRXEVO || defined _WIN32
 10 # define DllSpec __declspec(dllexport)
 11 # elif defined __GNUC__
 12 # define DllSpec __attribute__((visibility ("default")))
 13 # else
 14 # define DllSpec
 15 # endif
 16 #else // Import
 17 # if defined _VRXEVO
 18 # define DllSpec __declspec(dllimport)
 19 # else
 20 # define DllSpec
 21 # endif
 22 #endif
 23 
 24 #ifdef __cplusplus
 25 extern "C" {
 26 #endif
 27 
 28 #if 0 // fix for automatic indentation
 29 }
 30 #endif
 31 
 32 struct SND;
 33 
 35 typedef struct SND SND;
 36 
 38 enum SNDError {
 39  SND_OK=0,
 40  SND_ERR_FAIL=-1,
 41  SND_ERR_PARAMETER=-2,
 42  SND_ERR_NOT_FOUND=-3,
 43  SND_ERR_MEMORY=-4,
 44  SND_ERR_UNSUPPORTED=-5,
 45  SND_ERR_READ=-6
 46 };
 47 
 48 
 54 DllSpec struct SND* sndOpenFile(const char *filename);
 55 
 59 DllSpec void sndClose(struct SND *handle);
 60 
 65 DllSpec enum SNDError sndStart(struct SND *handle);
 66 
 72 DllSpec enum SNDError sndStop(struct SND *handle);
 73 
 81 DllSpec enum SNDError sndSeek(struct SND *handle, double pos, int whence);
 82 
 87 DllSpec double sndTell(struct SND *handle);
 88 
 96 DllSpec double sndLength(struct SND *handle);
 97 
 103 typedef void (*SNDCallback)(void *data, struct SND *handle, enum SNDError reason);
 104 
 110 DllSpec void sndSetCallback(struct SND *handle,
 111  SNDCallback cb,
 112  void *data);
 113 
 114 
 118 DllSpec int sndSoundSupport();
 119 
 124 DllSpec enum SNDError sndSetMasterVolume(int volume_percent);
 125 
 129 DllSpec int sndGetMasterVolume(void);
 130 
 131 
 139 DllSpec enum SNDError sndBeep(int frequency, int duration_ms, int volume);
 140 
 141 #ifdef __cplusplus
 142 }
 143 #endif
 144 
 145 #undef DllSpec
 146 #endif
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/sound_8h_source.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
